Chromium Code Reviews| Index: LayoutTests/inspector/sources/debugger/debugger-disable-enable.html |
| diff --git a/LayoutTests/inspector/sources/debugger/debugger-disable-enable.html b/LayoutTests/inspector/sources/debugger/debugger-disable-enable.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..04148e9a44ff3db9a5dd52a53ff6cff6e3557f8f |
| --- /dev/null |
| +++ b/LayoutTests/inspector/sources/debugger/debugger-disable-enable.html |
| @@ -0,0 +1,66 @@ |
| +<html> |
| +<head> |
| +<script src="../../../http/tests/inspector/inspector-test.js"></script> |
| +<script src="../../../http/tests/inspector/debugger-test.js"></script> |
| +<script> |
| + |
| +function testFunction() |
| +{ |
| + return 0; |
| +} |
| + |
| +var test = function() |
| +{ |
| + var testName = WebInspector.resourceTreeModel.inspectedPageURL(); |
| + testName = testName.substring(testName.lastIndexOf('/') + 1); |
| + setTimeout(InspectorTest.completeDebuggerTest, 1000); |
|
loislo
2014/06/06 18:00:21
please remove this.
sergeyv
2014/06/09 09:08:02
Done.
|
| + InspectorTest.startDebuggerTest(step1); |
| + |
| + function step1() |
| + { |
| + InspectorTest.showScriptSource(testName, step2); |
| + } |
| + |
| + function step2(sourceFrame) |
| + { |
| + InspectorTest.addResult("Main resource was shown."); |
| + InspectorTest.setBreakpoint(sourceFrame, 8, "", true); |
| + InspectorTest.addSniffer(WebInspector.debuggerModel, "_debuggerWasDisabled", step3); |
| + WebInspector.debuggerModel.disableDebugger(); |
| + } |
| + |
| + function step3() |
| + { |
| + InspectorTest.addResult("Debugger disabled."); |
| + InspectorTest.addResult("Evaluating test function."); |
| + InspectorTest.evaluateInConsole("testFunction()", step4); |
| + } |
| + |
| + function step4() |
| + { |
| + InspectorTest.addResult("function evaluated without a pause on the breakpoint."); |
| + InspectorTest.addSniffer(WebInspector.debuggerModel, "_debuggerWasEnabled", step5); |
| + WebInspector.debuggerModel.enableDebugger(); |
| + } |
| + |
| + function step5() |
| + { |
| + InspectorTest.addResult("Debugger was enabled"); |
| + InspectorTest.runTestFunctionAndWaitUntilPaused(step6); |
| + } |
| + |
| + function step6() |
| + { |
| + InspectorTest.completeDebuggerTest(); |
| + } |
| +}; |
| + |
| +</script> |
| +</head> |
| + |
| +<body onload="runTest()"> |
| +<p> |
| +Tests that breakpoints are successfully restored after debugger disabling.</a> |
| +</p> |
| +</body> |
| +</html> |