| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../../http/tests/inspector/console-test.js"></script> | 4 <script src="../../../http/tests/inspector/console-test.js"></script> |
| 5 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 5 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 var globalVar = { b: 1 }; | 8 var globalVar = { b: 1 }; |
| 9 | 9 |
| 10 function slave(x) | 10 function slave(x) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 } | 29 } |
| 30 | 30 |
| 31 function step2(callFrames) | 31 function step2(callFrames) |
| 32 { | 32 { |
| 33 InspectorTest.evaluateInConsole("x + y + globalVar.b", step3.bind(null,
callFrames)); | 33 InspectorTest.evaluateInConsole("x + y + globalVar.b", step3.bind(null,
callFrames)); |
| 34 } | 34 } |
| 35 | 35 |
| 36 function step3(callFrames, result) | 36 function step3(callFrames, result) |
| 37 { | 37 { |
| 38 InspectorTest.addResult("Evaluated script on the top frame: " + result); | 38 InspectorTest.addResult("Evaluated script on the top frame: " + result); |
| 39 var pane = WebInspector.panels.sources.sidebarPanes.callstack; | 39 var pane = self.runtime.sharedInstance(WebInspector.CallStackSidebarPane
); |
| 40 pane._callFrameSelected(pane.callFrames[1]); | 40 pane._callFrameSelected(pane.callFrames[1]); |
| 41 InspectorTest.deprecatedRunAfterPendingDispatches(step4); | 41 InspectorTest.deprecatedRunAfterPendingDispatches(step4); |
| 42 } | 42 } |
| 43 | 43 |
| 44 function step4() | 44 function step4() |
| 45 { | 45 { |
| 46 InspectorTest.evaluateInConsole("localObject.a + globalVar.b", step5); | 46 InspectorTest.evaluateInConsole("localObject.a + globalVar.b", step5); |
| 47 } | 47 } |
| 48 | 48 |
| 49 function step5(result) | 49 function step5(result) |
| 50 { | 50 { |
| 51 InspectorTest.addResult("Evaluated script on the calling frame: " + resu
lt); | 51 InspectorTest.addResult("Evaluated script on the calling frame: " + resu
lt); |
| 52 InspectorTest.completeDebuggerTest(); | 52 InspectorTest.completeDebuggerTest(); |
| 53 } | 53 } |
| 54 } | 54 } |
| 55 | 55 |
| 56 </script> | 56 </script> |
| 57 </head> | 57 </head> |
| 58 | 58 |
| 59 <body onload="runTest()"> | 59 <body onload="runTest()"> |
| 60 <p> | 60 <p> |
| 61 Tests that evaluation in console works fine when script is paused. It also check
s that | 61 Tests that evaluation in console works fine when script is paused. It also check
s that |
| 62 stack and global variables are accessible from the console. | 62 stack and global variables are accessible from the console. |
| 63 </p> | 63 </p> |
| 64 | 64 |
| 65 </body> | 65 </body> |
| 66 </html> | 66 </html> |
| OLD | NEW |