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

Side by Side Diff: LayoutTests/inspector/sources/debugger/debugger-disable-add-breakpoint.html

Issue 1153923005: DevTools: shard inspector/debugger tests for faster execution. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 = InspectorTest.resourceTreeModel.inspectedPageURL();
15 testName = testName.substring(testName.lastIndexOf('/') + 1);
16 InspectorTest.startDebuggerTest(step1);
17 var testSourceFrame;
18 function step1()
19 {
20 InspectorTest.showScriptSource(testName, step2);
21 }
22
23 function step2(sourceFrame)
24 {
25 testSourceFrame = sourceFrame;
26 InspectorTest.addResult("Main resource was shown.");
27 InspectorTest.debuggerModel.addEventListener(WebInspector.DebuggerModel. Events.DebuggerWasDisabled, step3, this);
28 InspectorTest.debuggerModel.disableDebugger();
29 }
30
31 function step3()
32 {
33 InspectorTest.debuggerModel.removeEventListener(WebInspector.DebuggerMod el.Events.DebuggerWasDisabled, step3, this);
34 InspectorTest.addResult("Debugger disabled.");
35 InspectorTest.setBreakpoint(testSourceFrame, 8, "", true);
36 InspectorTest.addResult("Breakpoint added");
37 InspectorTest.debuggerModel.addEventListener(WebInspector.DebuggerModel. Events.DebuggerWasEnabled, step4, this);
38 InspectorTest.debuggerModel.enableDebugger();
39 }
40
41 function step4()
42 {
43 InspectorTest.debuggerModel.removeEventListener(WebInspector.DebuggerMod el.Events.DebuggerWasEnabled, step4, this);
44 InspectorTest.addResult("Debugger was enabled");
45 InspectorTest.runTestFunctionAndWaitUntilPaused(step5);
46 }
47
48 function step5()
49 {
50 InspectorTest.resumeExecution(step6);
51 }
52
53 function step6()
54 {
55 InspectorTest.addResult("Disable debugger again");
56 InspectorTest.debuggerModel.addEventListener(WebInspector.DebuggerModel. Events.DebuggerWasDisabled, step7, this);
57 InspectorTest.debuggerModel.disableDebugger();
58 }
59
60 function step7()
61 {
62 InspectorTest.addResult("Debugger disabled");
63 var breakpoint = WebInspector.breakpointManager.findBreakpointOnLine(tes tSourceFrame.uiSourceCode(), 8);
64 breakpoint.remove();
65 InspectorTest.addResult("Breakpoint removed");
66 InspectorTest.debuggerModel.addEventListener(WebInspector.DebuggerModel. Events.DebuggerWasEnabled, step8, this);
67 InspectorTest.debuggerModel.enableDebugger();
68 }
69
70 function step8()
71 {
72 InspectorTest.addResult("Debugger enabled");
73 InspectorTest.addResult("Evaluating test function.");
74 InspectorTest.evaluateInPage("testFunction()", step9);
75 }
76
77 function step9()
78 {
79 InspectorTest.addResult("function evaluated without a pause on the break point.")
80 InspectorTest.completeDebuggerTest();
81 }
82 };
83
84 </script>
85 </head>
86
87 <body onload="runTest()">
88 <p>
89 Tests that breakpoints are correctly handled while debugger is turned off</a>
90 </p>
91 </body>
92 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698