Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / sources / debugger / js-with-inline-stylesheets.html
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5
6 <script>
7
8 function testFunction()
9 {
10     var x = Math.sqrt(10);
11     return x;
12 }
13
14 var test = function()
15 {
16     var currentSourceFrame;
17     InspectorTest.setQuiet(true);
18     var pageURL = "js-with-inline-stylesheets.html";
19     InspectorTest.runDebuggerTestSuite([
20         function testSetBreakpoint(next)
21         {
22             InspectorTest.showScriptSource(pageURL, didShowScriptSource);
23
24             function didShowScriptSource(sourceFrame)
25             {
26                 currentSourceFrame = sourceFrame;
27                 InspectorTest.addResult("Script source was shown.");
28                 InspectorTest.setBreakpoint(currentSourceFrame, 9, "", true);
29                 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
30             }
31
32             function didPause(callFrames)
33             {
34                 InspectorTest.addResult("Script execution paused.");
35                 InspectorTest.captureStackTrace(callFrames);
36                 InspectorTest.dumpBreakpointSidebarPane();
37                 InspectorTest.addSniffer(currentSourceFrame, "_removeBreakpointDecoration", breakpointRemoved);
38                 InspectorTest.removeBreakpoint(currentSourceFrame, 9);
39             }
40
41             function breakpointRemoved()
42             {
43                 InspectorTest.resumeExecution(didResume);
44             }
45
46             function didResume()
47             {
48                 InspectorTest.dumpBreakpointSidebarPane();
49                 InspectorTest.addResult("Script execution resumed.");
50                 next();
51             }
52         }
53     ]);
54 }
55
56 </script>
57 <style>
58 body {
59     color: green;
60 }
61 </style>
62
63 </head>
64
65 <body onload="runTest()">
66 <p>
67 Tests that JS sourcemapping for inline scripts followed by inline stylesheets does not break.
68 </p>
69
70 </body>
71 </html>