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

Side by Side Diff: LayoutTests/inspector-enabled/sources/debugger/script-formatter-breakpoints-1.html

Issue 338253007: Revert "DevTools: Load document (html) content from disk cache in page agent enabling." (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 src="../../../inspector/sources/debugger/resources/unformatted.js"></scr ipt>
6
7 <script>
8
9 function f1()
10 {
11 var a=0;var b=1;var c=3;var d=4;var e=5;
12 var f=0;
13 return 0;
14 }
15
16 function onload()
17 {
18 if (window.testRunner) {
19 testRunner.waitUntilDone();
20 testRunner.showWebInspector();
21 }
22 runTest();
23 }
24
25 var test = function()
26 {
27 WebInspector.breakpointManager._storage._breakpoints = {};
28 var panel = WebInspector.inspectorView.showPanel("sources");
29 var scriptFormatter = InspectorTest.scriptFormatter();
30 var sourceFrame;
31
32 InspectorTest.runDebuggerTestSuite([
33 function testBreakpointsInOriginalAndFormattedSource(next)
34 {
35 InspectorTest.showScriptSource("script-formatter-breakpoints-1.html" , didShowScriptSource);
36
37 function didShowScriptSource(frame)
38 {
39 sourceFrame = frame;
40 InspectorTest.setBreakpoint(sourceFrame, 11, "", true);
41 InspectorTest.waitUntilPaused(pausedInF1);
42 InspectorTest.evaluateInPageWithTimeout("f1()");
43 }
44
45 function pausedInF1(callFrames)
46 {
47 InspectorTest.dumpBreakpointSidebarPane("while paused in raw");
48 InspectorTest.resumeExecution(resumed);
49 }
50
51 function resumed()
52 {
53 InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorActio n.prototype, "_updateButton", uiSourceCodeScriptFormatted);
54 scriptFormatter._toggleFormatScriptSource();
55 }
56
57 function uiSourceCodeScriptFormatted()
58 {
59 // There should be a breakpoint in f1 although script is pretty- printed.
60 InspectorTest.waitUntilPaused(pausedInF1Again);
61 InspectorTest.evaluateInPageWithTimeout("f1()");
62 }
63
64 function pausedInF1Again(callFrames)
65 {
66 InspectorTest.dumpBreakpointSidebarPane("while paused in pretty printed");
67 scriptFormatter._discardFormattedUISourceCodeScript(panel.visibl eView.uiSourceCode());
68 InspectorTest.dumpBreakpointSidebarPane("while paused in raw");
69 InspectorTest.removeBreakpoint(sourceFrame, 11);
70 InspectorTest.resumeExecution(next);
71 }
72 }
73 ]);
74
75 }
76 </script>
77 </head>
78 <body onload="onload()">
79 <p>Tests the script formatting is working fine with breakpoints.
80 </p>
81 </body>
82 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698