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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script>
6
7 function testFunction()
8 {
9 return 0;
10 }
11
12 var test = function()
13 {
14 var testName = WebInspector.resourceTreeModel.inspectedPageURL();
15 testName = testName.substring(testName.lastIndexOf('/') + 1);
16 InspectorTest.startDebuggerTest(step1);
17
18 function step1()
19 {
20 InspectorTest.showScriptSource(testName, step2);
21 }
22
23 function step2(sourceFrame)
24 {
25 InspectorTest.addResult("Main resource was shown.");
26 InspectorTest.setBreakpoint(sourceFrame, 8, "", true);
27 InspectorTest.addSniffer(WebInspector.debuggerModel, "_debuggerWasDisabl ed", step3);
28 WebInspector.debuggerModel.disableDebugger();
29 }
30
31 function step3()
32 {
33 InspectorTest.addResult("Debugger disabled.");
34 InspectorTest.addResult("Evaluating test function.");
35 InspectorTest.evaluateInConsole("testFunction()", step4);
36 }
37
38 function step4()
39 {
40 InspectorTest.addResult("function evaluated without a pause on the break point.");
41 InspectorTest.addSniffer(WebInspector.debuggerModel, "_debuggerWasEnable d", step5);
42 WebInspector.debuggerModel.enableDebugger();
43 }
44
45 function step5()
46 {
47 InspectorTest.addResult("Debugger was enabled");
48 InspectorTest.runTestFunctionAndWaitUntilPaused(step6);
49 }
50
51 function step6()
52 {
53 InspectorTest.completeDebuggerTest();
54 }
55 };
56
57 </script>
58 </head>
59
60 <body onload="runTest()">
61 <p>
62 Tests that breakpoints are successfully restored after debugger disabling.</a>
63 </p>
64 </body>
65 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698