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

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: Test that adds/removes breakpoint while debugger is turned off 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 setTimeout(InspectorTest.completeDebuggerTest, 1000);
loislo 2014/06/06 18:00:21 please remove this.
sergeyv 2014/06/09 09:08:02 Done.
17 InspectorTest.startDebuggerTest(step1);
18
19 function step1()
20 {
21 InspectorTest.showScriptSource(testName, step2);
22 }
23
24 function step2(sourceFrame)
25 {
26 InspectorTest.addResult("Main resource was shown.");
27 InspectorTest.setBreakpoint(sourceFrame, 8, "", true);
28 InspectorTest.addSniffer(WebInspector.debuggerModel, "_debuggerWasDisabl ed", step3);
29 WebInspector.debuggerModel.disableDebugger();
30 }
31
32 function step3()
33 {
34 InspectorTest.addResult("Debugger disabled.");
35 InspectorTest.addResult("Evaluating test function.");
36 InspectorTest.evaluateInConsole("testFunction()", step4);
37 }
38
39 function step4()
40 {
41 InspectorTest.addResult("function evaluated without a pause on the break point.");
42 InspectorTest.addSniffer(WebInspector.debuggerModel, "_debuggerWasEnable d", step5);
43 WebInspector.debuggerModel.enableDebugger();
44 }
45
46 function step5()
47 {
48 InspectorTest.addResult("Debugger was enabled");
49 InspectorTest.runTestFunctionAndWaitUntilPaused(step6);
50 }
51
52 function step6()
53 {
54 InspectorTest.completeDebuggerTest();
55 }
56 };
57
58 </script>
59 </head>
60
61 <body onload="runTest()">
62 <p>
63 Tests that breakpoints are successfully restored after debugger disabling.</a>
64 </p>
65 </body>
66 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698