| 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/debugger-test.js"></script> | 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 5 <script src="../../../http/tests/inspector/console-test.js"></script> | 5 <script src="../../../http/tests/inspector/console-test.js"></script> |
| 6 | 6 |
| 7 <script> | 7 <script> |
| 8 function simpleTestFunction() | 8 function simpleTestFunction() |
| 9 { | 9 { |
| 10 return 0; | 10 return 0; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 function testRemoveBreakpoint(next) | 43 function testRemoveBreakpoint(next) |
| 44 { | 44 { |
| 45 InspectorTest.evaluateInConsole("debug(simpleTestFunction3); undebug
(simpleTestFunction3);"); | 45 InspectorTest.evaluateInConsole("debug(simpleTestFunction3); undebug
(simpleTestFunction3);"); |
| 46 InspectorTest.evaluateInConsole("setTimeout(simpleTestFunction3, 0)"
); | 46 InspectorTest.evaluateInConsole("setTimeout(simpleTestFunction3, 0)"
); |
| 47 InspectorTest.waitUntilPaused(didPause1); | 47 InspectorTest.waitUntilPaused(didPause1); |
| 48 | 48 |
| 49 function didPause1(callFrames, reason) | 49 function didPause1(callFrames, reason) |
| 50 { | 50 { |
| 51 InspectorTest.addResult("Script execution paused."); | 51 InspectorTest.addResult("Script execution paused."); |
| 52 InspectorTest.addResult("Reason for pause: " + (reason == WebIns
pector.DebuggerModel.BreakReason.DebugCommand ? "debug command" : "debugger stat
ement") + "."); | 52 InspectorTest.addResult("Reason for pause: " + (reason == SDK.De
buggerModel.BreakReason.DebugCommand ? "debug command" : "debugger statement") +
"."); |
| 53 next(); | 53 next(); |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 ]); | 56 ]); |
| 57 | 57 |
| 58 function setBreakpointAndRun(next, functionName, runCmd) | 58 function setBreakpointAndRun(next, functionName, runCmd) |
| 59 { | 59 { |
| 60 InspectorTest.evaluateInConsole("debug(" + functionName + ")"); | 60 InspectorTest.evaluateInConsole("debug(" + functionName + ")"); |
| 61 | 61 |
| 62 InspectorTest.addResult("Breakpoint added."); | 62 InspectorTest.addResult("Breakpoint added."); |
| 63 InspectorTest.evaluateInConsole("setTimeout(function() { " + runCmd + "
}, 0)"); | 63 InspectorTest.evaluateInConsole("setTimeout(function() { " + runCmd + "
}, 0)"); |
| 64 InspectorTest.addResult("Set timer for test function."); | 64 InspectorTest.addResult("Set timer for test function."); |
| 65 InspectorTest.waitUntilPaused(didPause); | 65 InspectorTest.waitUntilPaused(didPause); |
| 66 | 66 |
| 67 function didPause(callFrames, reason) | 67 function didPause(callFrames, reason) |
| 68 { | 68 { |
| 69 InspectorTest.addResult("Script execution paused."); | 69 InspectorTest.addResult("Script execution paused."); |
| 70 InspectorTest.captureStackTrace(callFrames); | 70 InspectorTest.captureStackTrace(callFrames); |
| 71 InspectorTest.evaluateInConsole("undebug(" + functionName + ")"); | 71 InspectorTest.evaluateInConsole("undebug(" + functionName + ")"); |
| 72 InspectorTest.addResult("Breakpoint removed."); | 72 InspectorTest.addResult("Breakpoint removed."); |
| 73 InspectorTest.assertEquals(reason, WebInspector.DebuggerModel.BreakR
eason.DebugCommand); | 73 InspectorTest.assertEquals(reason, SDK.DebuggerModel.BreakReason.Deb
ugCommand); |
| 74 InspectorTest.resumeExecution(didResume); | 74 InspectorTest.resumeExecution(didResume); |
| 75 } | 75 } |
| 76 | 76 |
| 77 function didResume() | 77 function didResume() |
| 78 { | 78 { |
| 79 InspectorTest.addResult("Script execution resumed."); | 79 InspectorTest.addResult("Script execution resumed."); |
| 80 next(); | 80 next(); |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 } | 83 } |
| 84 | 84 |
| 85 </script> | 85 </script> |
| 86 </head> | 86 </head> |
| 87 | 87 |
| 88 <body onload="runTest()"> | 88 <body onload="runTest()"> |
| 89 <p> | 89 <p> |
| 90 Tests debug(fn) console command. | 90 Tests debug(fn) console command. |
| 91 </p> | 91 </p> |
| 92 | 92 |
| 93 </body> | 93 </body> |
| 94 </html> | 94 </html> |
| OLD | NEW |