| 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..995676d964efe5b164381b7dddc43d834e24c3bf
|
| --- /dev/null
|
| +++ b/LayoutTests/inspector/sources/debugger/debugger-disable-enable.html
|
| @@ -0,0 +1,65 @@
|
| +<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);
|
| + 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>
|
|
|