| 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> | 5 <script> |
| 6 function testFunction() | 6 function testFunction() |
| 7 { | 7 { |
| 8 var x = Math.sqrt(10); | 8 var x = Math.sqrt(10); |
| 9 console.log("Done."); | 9 console.log("Done."); |
| 10 return x; | 10 return x; |
| 11 } | 11 } |
| 12 | 12 |
| 13 var test = function() | 13 var test = function() |
| 14 { | 14 { |
| 15 var currentSourceFrame; | 15 var currentSourceFrame; |
| 16 InspectorTest.setQuiet(true); | 16 InspectorTest.setQuiet(true); |
| 17 InspectorTest.runDebuggerTestSuite([ | 17 InspectorTest.runDebuggerTestSuite([ |
| 18 function testSetBreakpointPauseResumeThenDisable(next) | 18 function testSetBreakpointPauseResumeThenDisable(next) |
| 19 { | 19 { |
| 20 InspectorTest.showScriptSource("disable-breakpoints.html", didShowSc
riptSource); | 20 InspectorTest.showScriptSource("disable-breakpoints.html", didShowSc
riptSource); |
| 21 | 21 |
| 22 function didShowScriptSource(sourceFrame) | 22 function didShowScriptSource(sourceFrame) |
| 23 { | 23 { |
| 24 InspectorTest.addResult("Script source was shown."); | 24 InspectorTest.addResult("Script source was shown."); |
| 25 InspectorTest.setBreakpoint(sourceFrame, 7, "", true); | |
| 26 InspectorTest.waitUntilPaused(didPause); | 25 InspectorTest.waitUntilPaused(didPause); |
| 27 InspectorTest.runTestFunction(); | 26 InspectorTest.createNewBreakpoint(sourceFrame, 7, "", true) |
| 27 .then(() => InspectorTest.waitBreakpointSidebarPane()) |
| 28 .then(() => InspectorTest.runTestFunction()); |
| 28 } | 29 } |
| 29 | 30 |
| 30 function didPause(callFrames) | 31 function didPause(callFrames) |
| 31 { | 32 { |
| 32 InspectorTest.addResult("Script execution paused."); | 33 InspectorTest.addResult("Script execution paused."); |
| 33 InspectorTest.captureStackTrace(callFrames); | 34 InspectorTest.captureStackTrace(callFrames); |
| 34 InspectorTest.dumpBreakpointSidebarPane(); | 35 InspectorTest.dumpBreakpointSidebarPane(); |
| 35 InspectorTest.addConsoleSniffer(testFunctionFinishedForTheFirstT
ime); | 36 InspectorTest.addConsoleSniffer(testFunctionFinishedForTheFirstT
ime); |
| 36 InspectorTest.resumeExecution(didResume); | 37 InspectorTest.resumeExecution(didResume); |
| 37 } | 38 } |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 } | 105 } |
| 105 }, | 106 }, |
| 106 ]); | 107 ]); |
| 107 } | 108 } |
| 108 </script> | 109 </script> |
| 109 </head> | 110 </head> |
| 110 <body onload="runTest()"> | 111 <body onload="runTest()"> |
| 111 <p>Tests disabling breakpoints.</p> | 112 <p>Tests disabling breakpoints.</p> |
| 112 </body> | 113 </body> |
| 113 </html> | 114 </html> |
| OLD | NEW |