| Index: LayoutTests/inspector/sources/debugger/disable-breakpoints.html_disabled
|
| diff --git a/LayoutTests/inspector/sources/debugger/disable-breakpoints.html_disabled b/LayoutTests/inspector/sources/debugger/disable-breakpoints.html_disabled
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bb0b5d5da94d369f1c80387939931edfaae4ecbd
|
| --- /dev/null
|
| +++ b/LayoutTests/inspector/sources/debugger/disable-breakpoints.html_disabled
|
| @@ -0,0 +1,113 @@
|
| +<html>
|
| +<head>
|
| +<script src="../../../http/tests/inspector/inspector-test.js"></script>
|
| +<script src="../../../http/tests/inspector/debugger-test.js"></script>
|
| +<script>
|
| +function testFunction()
|
| +{
|
| + var x = Math.sqrt(10);
|
| + console.log("Done.");
|
| + return x;
|
| +}
|
| +
|
| +var test = function()
|
| +{
|
| + var currentSourceFrame;
|
| + InspectorTest.setQuiet(true);
|
| + InspectorTest.runDebuggerTestSuite([
|
| + function testSetBreakpointPauseResumeThenDisable(next)
|
| + {
|
| + InspectorTest.showScriptSource("disable-breakpoints.html", didShowScriptSource);
|
| +
|
| + function didShowScriptSource(sourceFrame)
|
| + {
|
| + InspectorTest.addResult("Script source was shown.");
|
| + InspectorTest.setBreakpoint(sourceFrame, 7, "", true);
|
| + InspectorTest.waitUntilPaused(didPause);
|
| + InspectorTest.runTestFunction();
|
| + }
|
| +
|
| + function didPause(callFrames)
|
| + {
|
| + InspectorTest.addResult("Script execution paused.");
|
| + InspectorTest.captureStackTrace(callFrames);
|
| + InspectorTest.dumpBreakpointSidebarPane();
|
| + InspectorTest.addConsoleSniffer(testFunctionFinishedForTheFirstTime);
|
| + InspectorTest.resumeExecution(didResume);
|
| + }
|
| +
|
| + function didResume(callFrames)
|
| + {
|
| + InspectorTest.addResult("Script execution resumed.");
|
| + }
|
| +
|
| + function testFunctionFinishedForTheFirstTime()
|
| + {
|
| + InspectorTest.addResult("Test function finished.");
|
| +
|
| + InspectorTest.addResult("Disabling breakpoints...");
|
| + WebInspector.breakpointManager.setBreakpointsActive(false);
|
| +
|
| + InspectorTest.addResult("Running test function again...");
|
| + InspectorTest.addConsoleSniffer(testFunctionFinishedForTheSecondTime);
|
| + InspectorTest.runTestFunction();
|
| + }
|
| +
|
| + function testFunctionFinishedForTheSecondTime(callFrames)
|
| + {
|
| + InspectorTest.addResult("Test function finished.");
|
| + next();
|
| + }
|
| + },
|
| +
|
| + function testEnableBreakpointsAgain(next)
|
| + {
|
| + InspectorTest.showScriptSource("disable-breakpoints.html", didShowScriptSource);
|
| +
|
| + function didShowScriptSource(sourceFrame)
|
| + {
|
| + currentSourceFrame = sourceFrame;
|
| + InspectorTest.addResult("Enabling breakpoints...");
|
| + WebInspector.breakpointManager.setBreakpointsActive(true);
|
| +
|
| + InspectorTest.addResult("Running test function...");
|
| + InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
|
| + }
|
| +
|
| + function didPause(callFrames)
|
| + {
|
| + InspectorTest.addResult("Script execution paused.");
|
| + InspectorTest.captureStackTrace(callFrames);
|
| + InspectorTest.dumpBreakpointSidebarPane();
|
| + InspectorTest.addConsoleSniffer(testFunctionFinished);
|
| + InspectorTest.resumeExecution(didResume);
|
| + }
|
| +
|
| + function didResume(callFrames)
|
| + {
|
| + InspectorTest.addResult("Script execution resumed.");
|
| + }
|
| +
|
| + function testFunctionFinished()
|
| + {
|
| + InspectorTest.addResult("Test function finished.");
|
| + InspectorTest.dumpBreakpointSidebarPane();
|
| + InspectorTest.addSniffer(currentSourceFrame, "_removeBreakpointDecoration", breakpointRemoved);
|
| + InspectorTest.removeBreakpoint(currentSourceFrame, 7);
|
| + }
|
| +
|
| + function breakpointRemoved()
|
| + {
|
| + InspectorTest.addResult("Breakpoints removed.");
|
| + InspectorTest.dumpBreakpointSidebarPane();
|
| + next();
|
| + }
|
| + },
|
| + ]);
|
| +}
|
| +</script>
|
| +</head>
|
| +<body onload="runTest()">
|
| +<p>Tests disabling breakpoints.</p>
|
| +</body>
|
| +</html>
|
|
|