OLD | NEW |
1 <html> | 1 <html> |
2 <script src="../../http/tests/inspector/inspector-test.js"></script> | 2 <script src="../../http/tests/inspector/inspector-test.js"></script> |
3 <script src="../../http/tests/inspector/debugger-test.js"></script> | 3 <script src="../../http/tests/inspector/debugger-test.js"></script> |
4 | 4 |
5 <script type="application/dart" src="scope-variables.dart"></script> | 5 <script type="application/dart" src="scope-variables.dart"></script> |
6 | 6 |
7 <script> | 7 <script> |
8 | 8 |
9 function postMessageToDart() | 9 function postMessageToDart() |
10 { | 10 { |
11 window.postMessage('fromJS', '*'); | 11 window.postMessage('fromJS', '*'); |
12 } | 12 } |
13 | 13 |
| 14 function testFunction() { |
| 15 postMessageToDart(); |
| 16 } |
| 17 |
14 function test() | 18 function test() |
15 { | 19 { |
| 20 var panel = WebInspector.inspectorView.showPanel("sources"); |
16 InspectorTest.runDebuggerTestSuite([ | 21 InspectorTest.runDebuggerTestSuite([ |
17 function testScopeChain(next) | 22 function testScopeChain(next) |
18 { | 23 { |
19 InspectorTest.showScriptSource('scope-variables.dart', didShowScript
Source); | 24 InspectorTest.showScriptSource('scope-variables.dart', didShowScript
Source); |
20 | 25 |
21 function didShowScriptSource(sourceFrame) | 26 function didShowScriptSource(sourceFrame) |
22 { | 27 { |
23 InspectorTest.addSniffer(WebInspector.JavaScriptSourceFrame.prot
otype, "_addBreakpointDecoration", didAddBreakpoint); | 28 InspectorTest.addSniffer(WebInspector.JavaScriptSourceFrame.prot
otype, "_addBreakpointDecoration", didAddBreakpoint); |
24 InspectorTest.setBreakpoint(sourceFrame, 21, '', true); | 29 InspectorTest.setBreakpoint(sourceFrame, 21, '', true); |
25 } | 30 } |
26 | 31 |
27 function didAddBreakpoint(lineNumber) | 32 function didAddBreakpoint(lineNumber) |
28 { | 33 { |
29 InspectorTest.addResult("Breakpoint added to source frame at lin
e " + lineNumber); | 34 InspectorTest.addResult("Breakpoint added to source frame at lin
e " + lineNumber); |
30 InspectorTest.waitUntilPaused(didPauseInDart); | 35 InspectorTest.runTestFunctionAndWaitUntilPaused(didPauseInDart); |
31 InspectorTest.evaluateInPage('postMessageToDart()'); | |
32 } | 36 } |
33 | 37 |
34 function didPauseInDart(callFrames) | 38 function didPauseInDart(callFrames) |
35 { | 39 { |
36 InspectorTest.captureStackTrace(callFrames); | 40 InspectorTest.captureStackTrace(callFrames); |
37 expandScopeChainSections(); | 41 expandScopeChainSections(); |
38 InspectorTest.runAfterPendingDispatches(didExpandScopeChainSecti
ons); | 42 InspectorTest.runAfterPendingDispatches(didExpandScopeChainSecti
ons); |
39 } | 43 } |
40 | 44 |
41 function didExpandScopeChainSections() | 45 function didExpandScopeChainSections() |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 InspectorTest.addResult(contents); | 92 InspectorTest.addResult(contents); |
89 } | 93 } |
90 } | 94 } |
91 }; | 95 }; |
92 </script> | 96 </script> |
93 | 97 |
94 <body onload="runTest()"> | 98 <body onload="runTest()"> |
95 <div id="example_div">Example div</div> | 99 <div id="example_div">Example div</div> |
96 </body> | 100 </body> |
97 </html> | 101 </html> |
OLD | NEW |