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

Side by Side Diff: LayoutTests/inspector-enabled/sources/debugger/script-formatter-breakpoints-4.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/unformatted4.js"></sc ript>
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
31 InspectorTest.runDebuggerTestSuite([
32 function testBreakpointSetInOriginalAndRemovedInFormatted(next)
33 {
34 InspectorTest.showScriptSource("script-formatter-breakpoints-4.html" , didShowScriptSource);
35
36 function didShowScriptSource(sourceFrame)
37 {
38 InspectorTest.addResult("Adding breakpoint.");
39 InspectorTest.addSniffer(WebInspector.BreakpointManager.TargetBr eakpoint.prototype, "_addResolvedLocation", breakpointResolved);
40 InspectorTest.setBreakpoint(sourceFrame, 11, "", true);
41 }
42
43 function breakpointResolved()
44 {
45 InspectorTest.addResult("Formatting.");
46 InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorActio n.prototype, "_updateButton", uiSourceCodeScriptFormatted);
47 scriptFormatter._toggleFormatScriptSource();
48 }
49
50 function uiSourceCodeScriptFormatted()
51 {
52 InspectorTest.addResult("Removing breakpoint.");
53 var formattedSourceFrame = panel.visibleView;
54 InspectorTest.removeBreakpoint(formattedSourceFrame, 19);
55 InspectorTest.addResult("Unformatting.");
56 scriptFormatter._discardFormattedUISourceCodeScript(panel.visibl eView.uiSourceCode());
57 var breakpoints = WebInspector.breakpointManager._storage._setti ng.get();
58 InspectorTest.assertEquals(breakpoints.length, 0, "There should not be any breakpoints in the storage.");
59 next();
60 }
61 }
62 ]);
63
64 }
65 </script>
66 </head>
67 <body onload="onload()">
68 <p>Tests the script formatting is working fine with breakpoints.
69 </p>
70 </body>
71 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698