Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / debugger / js-with-inline-stylesheets.html
blob7bef006101078bd526786e639e18f69880f251a8
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
6 <script>
8 function testFunction()
10 var x = Math.sqrt(10);
11 return x;
14 var test = function()
16 var currentSourceFrame;
17 InspectorTest.setQuiet(true);
18 var pageURL = "js-with-inline-stylesheets.html";
19 InspectorTest.runDebuggerTestSuite([
20 function testSetBreakpoint(next)
22 InspectorTest.showScriptSource(pageURL, didShowScriptSource);
24 function didShowScriptSource(sourceFrame)
26 currentSourceFrame = sourceFrame;
27 InspectorTest.addResult("Script source was shown.");
28 InspectorTest.setBreakpoint(currentSourceFrame, 9, "", true);
29 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
32 function didPause(callFrames)
34 InspectorTest.addResult("Script execution paused.");
35 InspectorTest.captureStackTrace(callFrames);
36 InspectorTest.dumpBreakpointSidebarPane();
37 InspectorTest.addSniffer(currentSourceFrame, "_removeBreakpointDecoration", breakpointRemoved);
38 InspectorTest.removeBreakpoint(currentSourceFrame, 9);
41 function breakpointRemoved()
43 InspectorTest.resumeExecution(didResume);
46 function didResume()
48 InspectorTest.dumpBreakpointSidebarPane();
49 InspectorTest.addResult("Script execution resumed.");
50 next();
53 ]);
56 </script>
57 <style>
58 body {
59 color: green;
61 </style>
63 </head>
65 <body onload="runTest()">
66 <p>
67 Tests that JS sourcemapping for inline scripts followed by inline stylesheets does not break.
68 </p>
70 </body>
71 </html>