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

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

Issue 2544383002: [DevTools] fixed script-formatter-breakpoints-1.html (Closed)
Patch Set: a Created 4 years 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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script> 4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script src="../../../inspector/sources/debugger/resources/unformatted.js"></scr ipt> 5 <script src="../../../inspector/sources/debugger/resources/unformatted.js"></scr ipt>
6 6
7 <script> 7 <script>
8 8
9 function f1() 9 function f1()
10 { 10 {
(...skipping 28 matching lines...) Expand all
39 }, 39 },
40 40
41 function testBreakpointsInOriginalAndFormattedSource(next) 41 function testBreakpointsInOriginalAndFormattedSource(next)
42 { 42 {
43 InspectorTest.showScriptSource("script-formatter-breakpoints-1.html" , didShowScriptSource); 43 InspectorTest.showScriptSource("script-formatter-breakpoints-1.html" , didShowScriptSource);
44 44
45 function didShowScriptSource(frame) 45 function didShowScriptSource(frame)
46 { 46 {
47 sourceFrame = frame; 47 sourceFrame = frame;
48 InspectorTest.setBreakpoint(sourceFrame, 11, "", true); 48 InspectorTest.setBreakpoint(sourceFrame, 11, "", true);
49 InspectorTest.waitUntilPaused(pausedInF1); 49 Promise.all([
50 InspectorTest.waitBreakpointSidebarPane(true),
51 InspectorTest.waitUntilPausedPromise()
52 ]).then(pausedInF1);
50 InspectorTest.evaluateInPageWithTimeout("f1()"); 53 InspectorTest.evaluateInPageWithTimeout("f1()");
51 } 54 }
52 55
53 function pausedInF1(callFrames) 56 function pausedInF1(callFrames)
54 { 57 {
55 InspectorTest.dumpBreakpointSidebarPane("while paused in raw"); 58 InspectorTest.dumpBreakpointSidebarPane("while paused in raw");
56 InspectorTest.resumeExecution(resumed); 59 InspectorTest.resumeExecution(resumed);
57 } 60 }
58 61
59 function resumed() 62 function resumed()
60 { 63 {
61 InspectorTest.addSniffer(Sources.ScriptFormatterEditorAction.pro totype, "_updateButton", uiSourceCodeScriptFormatted); 64 InspectorTest.addSniffer(Sources.ScriptFormatterEditorAction.pro totype, "_updateButton", uiSourceCodeScriptFormatted);
62 scriptFormatter._toggleFormatScriptSource(); 65 scriptFormatter._toggleFormatScriptSource();
63 } 66 }
64 67
65 function uiSourceCodeScriptFormatted() 68 function uiSourceCodeScriptFormatted()
66 { 69 {
67 // There should be a breakpoint in f1 although script is pretty- printed. 70 // There should be a breakpoint in f1 although script is pretty- printed.
68 InspectorTest.waitUntilPaused(pausedInF1Again); 71 Promise.all([
72 InspectorTest.waitBreakpointSidebarPane(true),
73 InspectorTest.waitUntilPausedPromise()
74 ]).then(pausedInF1Again);
69 InspectorTest.evaluateInPageWithTimeout("f1()"); 75 InspectorTest.evaluateInPageWithTimeout("f1()");
70 } 76 }
71 77
72 function pausedInF1Again(callFrames) 78 function pausedInF1Again(callFrames)
73 { 79 {
74 InspectorTest.dumpBreakpointSidebarPane("while paused in pretty printed"); 80 InspectorTest.dumpBreakpointSidebarPane("while paused in pretty printed");
75 scriptFormatter._discardFormattedUISourceCodeScript(panel.visibl eView.uiSourceCode()); 81 scriptFormatter._discardFormattedUISourceCodeScript(panel.visibl eView.uiSourceCode());
76 InspectorTest.waitBreakpointSidebarPane().then(onBreakpointsUpda ted); 82 InspectorTest.waitBreakpointSidebarPane().then(onBreakpointsUpda ted);
77 } 83 }
78 84
79 function onBreakpointsUpdated() 85 function onBreakpointsUpdated()
80 { 86 {
81 InspectorTest.dumpBreakpointSidebarPane("while paused in raw"); 87 InspectorTest.dumpBreakpointSidebarPane("while paused in raw");
82 InspectorTest.removeBreakpoint(sourceFrame, 11); 88 InspectorTest.removeBreakpoint(sourceFrame, 11);
83 InspectorTest.resumeExecution(next); 89 InspectorTest.resumeExecution(next);
84 } 90 }
85 } 91 }
86 ]); 92 ]);
87 93
88 } 94 }
89 </script> 95 </script>
90 </head> 96 </head>
91 <body onload="onload()"> 97 <body onload="onload()">
92 <p>Tests the script formatting is working fine with breakpoints. 98 <p>Tests the script formatting is working fine with breakpoints.
93 </p> 99 </p>
94 </body> 100 </body>
95 </html> 101 </html>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698