Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / debugger-ui / reveal-execution-line.html
blobf3f75d0ebad77cbd3837fad2e526bec5ed7bdf24
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 <script>
6 function testFunction()
8 debugger;
11 var test = function()
13 InspectorTest.setQuiet(true);
14 InspectorTest.runDebuggerTestSuite([
15 function testRevealAndHighlightExecutionLine(next)
17 var executionLineSet = false;
18 var executionLineRevealed = false;
19 InspectorTest.addSniffer(WebInspector.SourceFrame.prototype, "revealPosition", didRevealLine);
20 InspectorTest.addSniffer(WebInspector.JavaScriptSourceFrame.prototype, "setExecutionLocation", didSetExecutionLocation);
21 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
23 function didPause(callFrames)
27 function didSetExecutionLocation(uiLocation)
29 if (executionLineSet)
30 return;
31 executionLineSet = true;
32 maybeNext();
35 function didRevealLine(line)
37 if (executionLineRevealed)
38 return;
39 if (this.isShowing()) {
40 executionLineRevealed = true;
41 maybeNext();
45 function maybeNext()
47 if (executionLineRevealed && executionLineSet) {
48 InspectorTest.addResult("Execution line revealed and highlighted.");
49 InspectorTest.resumeExecution(next);
53 ]);
55 </script>
56 </head>
57 <body onload="runTest()">
58 <p>Tests that execution line is revealed and highlighted when debugger is paused.</p>
59 <a href="https://bugs.webkit.org/show_bug.cgi?id=80306">Bug 80306</a>
60 </body>
61 </html>