| 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 | 6 |
| 7 function testFunction() | 7 function testFunction() |
| 8 { | 8 { |
| 9 return 0; | 9 return 0; |
| 10 } | 10 } |
| 11 | 11 |
| 12 var test = function() | 12 var test = function() |
| 13 { | 13 { |
| 14 var testName = WebInspector.resourceTreeModel.inspectedPageURL(); | 14 var testName = InspectorTest.resourceTreeModel.inspectedPageURL(); |
| 15 testName = testName.substring(testName.lastIndexOf('/') + 1); | 15 testName = testName.substring(testName.lastIndexOf('/') + 1); |
| 16 InspectorTest.startDebuggerTest(step1); | 16 InspectorTest.startDebuggerTest(step1); |
| 17 | 17 |
| 18 function step1() | 18 function step1() |
| 19 { | 19 { |
| 20 InspectorTest.showScriptSource(testName, step2); | 20 InspectorTest.showScriptSource(testName, step2); |
| 21 } | 21 } |
| 22 | 22 |
| 23 function step2(sourceFrame) | 23 function step2(sourceFrame) |
| 24 { | 24 { |
| 25 InspectorTest.addResult("Main resource was shown."); | 25 InspectorTest.addResult("Main resource was shown."); |
| 26 InspectorTest.setBreakpoint(sourceFrame, 8, "", true); | 26 InspectorTest.setBreakpoint(sourceFrame, 8, "", true); |
| 27 WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.E
vents.DebuggerWasDisabled, step3, this); | 27 InspectorTest.debuggerModel.addEventListener(WebInspector.DebuggerModel.
Events.DebuggerWasDisabled, step3, this); |
| 28 WebInspector.debuggerModel.disableDebugger(); | 28 InspectorTest.debuggerModel.disableDebugger(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 function step3() | 31 function step3() |
| 32 { | 32 { |
| 33 InspectorTest.addResult("Debugger disabled."); | 33 InspectorTest.addResult("Debugger disabled."); |
| 34 InspectorTest.addResult("Evaluating test function."); | 34 InspectorTest.addResult("Evaluating test function."); |
| 35 InspectorTest.evaluateInPage("testFunction()", step4); | 35 InspectorTest.evaluateInPage("testFunction()", step4); |
| 36 } | 36 } |
| 37 | 37 |
| 38 function step4() | 38 function step4() |
| 39 { | 39 { |
| 40 InspectorTest.addResult("function evaluated without a pause on the break
point."); | 40 InspectorTest.addResult("function evaluated without a pause on the break
point."); |
| 41 WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.E
vents.DebuggerWasEnabled, step5, this); | 41 InspectorTest.debuggerModel.addEventListener(WebInspector.DebuggerModel.
Events.DebuggerWasEnabled, step5, this); |
| 42 WebInspector.debuggerModel.enableDebugger(); | 42 InspectorTest.debuggerModel.enableDebugger(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 function step5() | 45 function step5() |
| 46 { | 46 { |
| 47 InspectorTest.addResult("Debugger was enabled"); | 47 InspectorTest.addResult("Debugger was enabled"); |
| 48 InspectorTest.runTestFunctionAndWaitUntilPaused(step6); | 48 InspectorTest.runTestFunctionAndWaitUntilPaused(step6); |
| 49 } | 49 } |
| 50 | 50 |
| 51 function step6() | 51 function step6() |
| 52 { | 52 { |
| 53 InspectorTest.completeDebuggerTest(); | 53 InspectorTest.completeDebuggerTest(); |
| 54 } | 54 } |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 </script> | 57 </script> |
| 58 </head> | 58 </head> |
| 59 | 59 |
| 60 <body onload="runTest()"> | 60 <body onload="runTest()"> |
| 61 <p> | 61 <p> |
| 62 Tests that breakpoints are successfully restored after debugger disabling.</a> | 62 Tests that breakpoints are successfully restored after debugger disabling.</a> |
| 63 </p> | 63 </p> |
| 64 </body> | 64 </body> |
| 65 </html> | 65 </html> |
| OLD | NEW |