| 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="evaluate-in-console.dart"></script> | 5 <script type="application/dart" src="evaluate-in-console.dart"></script> |
| 6 | 6 |
| 7 <script> | 7 <script> |
| 8 function postMessageToDart() | 8 function postMessageToDart() |
| 9 { | 9 { |
| 10 window.postMessage('fromJS', '*'); | 10 window.postMessage('fromJS', '*'); |
| 11 } | 11 } |
| 12 | 12 |
| 13 function testFunction() { |
| 14 postMessageToDart(); |
| 15 } |
| 16 |
| 13 function test() | 17 function test() |
| 14 { | 18 { |
| 19 var panel = WebInspector.inspectorView.showPanel("sources"); |
| 15 InspectorTest.runDebuggerTestSuite([ | 20 InspectorTest.runDebuggerTestSuite([ |
| 16 function testScopeChain(next) | 21 function testScopeChain(next) |
| 17 { | 22 { |
| 18 InspectorTest.showScriptSource('evaluate-in-console.dart', didShowSc
riptSource); | 23 InspectorTest.showScriptSource('evaluate-in-console.dart', didShowSc
riptSource); |
| 19 | 24 |
| 20 function didShowScriptSource(sourceFrame) | 25 function didShowScriptSource(sourceFrame) |
| 21 { | 26 { |
| 22 InspectorTest.addSniffer(WebInspector.JavaScriptSourceFrame.prot
otype, "_addBreakpointDecoration", didAddBreakpoint); | 27 InspectorTest.addSniffer(WebInspector.JavaScriptSourceFrame.prot
otype, "_addBreakpointDecoration", didAddBreakpoint); |
| 23 InspectorTest.setBreakpoint(sourceFrame, 12, '', true); | 28 InspectorTest.setBreakpoint(sourceFrame, 12, '', true); |
| 24 } | 29 } |
| 25 | 30 |
| 26 function didAddBreakpoint(lineNumber) | 31 function didAddBreakpoint(lineNumber) |
| 27 { | 32 { |
| 28 InspectorTest.addResult("Breakpoint added to source frame at lin
e " + lineNumber); | 33 InspectorTest.addResult("Breakpoint added to source frame at lin
e " + lineNumber); |
| 29 InspectorTest.waitUntilPaused(didPauseInDart); | 34 InspectorTest.runTestFunctionAndWaitUntilPaused(didPauseInDart); |
| 30 InspectorTest.evaluateInPage('postMessageToDart()'); | |
| 31 } | 35 } |
| 32 | 36 |
| 33 function didPauseInDart(callFrames) | 37 function didPauseInDart(callFrames) |
| 34 { | 38 { |
| 35 InspectorTest.captureStackTrace(callFrames); | 39 InspectorTest.captureStackTrace(callFrames); |
| 36 | 40 |
| 37 function evaluate(expression) | 41 function evaluate(expression) |
| 38 { | 42 { |
| 39 InspectorTest.evaluateInConsole(expression, didEvaluateInCon
sole); | 43 InspectorTest.evaluateInConsole(expression, didEvaluateInCon
sole); |
| 40 function didEvaluateInConsole(result) | 44 function didEvaluateInConsole(result) |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 InspectorTest.resumeExecution(next); | 111 InspectorTest.resumeExecution(next); |
| 108 }); | 112 }); |
| 109 } | 113 } |
| 110 ]); | 114 ]); |
| 111 }; | 115 }; |
| 112 </script> | 116 </script> |
| 113 | 117 |
| 114 <body onload="runTest()"> | 118 <body onload="runTest()"> |
| 115 </body> | 119 </body> |
| 116 </html> | 120 </html> |
| OLD | NEW |