Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: LayoutTests/inspector/sources/debugger/debugger-disable-enable.html

Issue 323503002: Devtools: Support disabling and enabling of debugger in TargetBreakpoints (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix expectations Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698