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

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

Issue 10005037: Merge 112841 - Web Inspector: breakpoints are not shown in sidebar pane after switching pretty-prin… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | LayoutTests/inspector/debugger/script-formatter-breakpoints-expected.txt » ('j') | 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 5
6 <script> 6 <script>
7 7
8 function f1() 8 function f1()
9 { 9 {
10 var a=0;var b=1;var c=3;var d=4;var e=5; 10 var a=0;var b=1;var c=3;var d=4;var e=5;
(...skipping 21 matching lines...) Expand all
32 { 32 {
33 root = sourceFrame._url.substr(0, sourceFrame._url.lastIndexOf(" /") + 1); 33 root = sourceFrame._url.substr(0, sourceFrame._url.lastIndexOf(" /") + 1);
34 InspectorTest.setBreakpoint(sourceFrame, 10, "", true); 34 InspectorTest.setBreakpoint(sourceFrame, 10, "", true);
35 InspectorTest.waitUntilPaused(pausedInF1); 35 InspectorTest.waitUntilPaused(pausedInF1);
36 InspectorTest.evaluateInPageWithTimeout("f1()"); 36 InspectorTest.evaluateInPageWithTimeout("f1()");
37 } 37 }
38 38
39 function pausedInF1(callFrames) 39 function pausedInF1(callFrames)
40 { 40 {
41 InspectorTest.assertEquals("f1", callFrames[0].functionName); 41 InspectorTest.assertEquals("f1", callFrames[0].functionName);
42 dumpBreakpointSidebarPane();
42 InspectorTest.resumeExecution(resumed); 43 InspectorTest.resumeExecution(resumed);
43 } 44 }
44 45
45 function resumed() 46 function resumed()
46 { 47 {
47 InspectorTest.navigate(root + "resources/test-navigation.html", didNavigateAnotherPage); 48 InspectorTest.navigate(root + "resources/test-navigation.html", didNavigateAnotherPage);
48 } 49 }
49 50
50 function didNavigateAnotherPage() 51 function didNavigateAnotherPage()
51 { 52 {
52 InspectorTest.addResult("Navigated to test-navigation.html"); 53 InspectorTest.addResult("Navigated to test-navigation.html");
53 panel._toggleFormatSource(); 54 panel._toggleFormatSource();
54 InspectorTest.showScriptSource("test-navigation.html", didShowAn otherPage); 55 InspectorTest.showScriptSource("test-navigation.html", didShowAn otherPage);
55 } 56 }
56 57
57 function didShowAnotherPage(sourceFrame) 58 function didShowAnotherPage(sourceFrame)
58 { 59 {
59 InspectorTest.navigate(root + "script-formatter-breakpoints.html ", didNavigateBack); 60 InspectorTest.navigate(root + "script-formatter-breakpoints.html ", didNavigateBack);
60 } 61 }
61 62
62 function didNavigateBack() 63 function didNavigateBack()
63 { 64 {
64 InspectorTest.addResult("Navigated back to test page."); 65 InspectorTest.addResult("Navigated back to test page.");
66 dumpBreakpointSidebarPane();
65 InspectorTest.showScriptSource("script-formatter-breakpoints.htm l", didShowFormattedScriptSource); 67 InspectorTest.showScriptSource("script-formatter-breakpoints.htm l", didShowFormattedScriptSource);
66 } 68 }
67 69
68 function didShowFormattedScriptSource(sourceFrame) 70 function didShowFormattedScriptSource(sourceFrame)
69 { 71 {
70 // There should be no breakpoint in f1 since script is pretty-pr inted now. 72 // There should be no breakpoint in f1 since script is pretty-pr inted now.
71 InspectorTest.evaluateInPageWithTimeout("f1()"); 73 InspectorTest.evaluateInPageWithTimeout("f1()");
72 InspectorTest.setBreakpoint(panel.visibleView, 24, "", true); 74 InspectorTest.setBreakpoint(panel.visibleView, 24, "", true);
73 InspectorTest.waitUntilPaused(pausedInF2); 75 InspectorTest.waitUntilPaused(pausedInF2);
74 InspectorTest.evaluateInPageWithTimeout("f2()"); 76 InspectorTest.evaluateInPageWithTimeout("f2()");
75 } 77 }
76 78
77 function pausedInF2(callFrames) 79 function pausedInF2(callFrames)
78 { 80 {
79 InspectorTest.assertEquals("f2", callFrames[0].functionName); 81 InspectorTest.assertEquals("f2", callFrames[0].functionName);
82 dumpBreakpointSidebarPane();
80 panel._toggleFormatSource(); 83 panel._toggleFormatSource();
81 InspectorTest.resumeExecution(next); 84 InspectorTest.resumeExecution(resumedF2);
85 }
86
87 function resumedF2()
88 {
89 dumpBreakpointSidebarPane();
90 next();
82 } 91 }
83 } 92 }
84 ]); 93 ]);
94
95 function dumpBreakpointSidebarPane()
96 {
97 var paneElement = WebInspector.panels.scripts.sidebarPanes.jsBreakpoints .listElement
98 InspectorTest.addResult("");
99 InspectorTest.addResult("Dump breakpoint sidebar pane:");
100 InspectorTest.addResult(InspectorTest.textContentWithLineBreaks(paneElem ent));
101 }
85 } 102 }
86 103
87 </script> 104 </script>
88 105
89 </head> 106 </head>
90 107
91 <body onload="runTest()"> 108 <body onload="runTest()">
92 <p>Tests the script formatting is working fine with breakpoints. 109 <p>Tests the script formatting is working fine with breakpoints.
93 </p> 110 </p>
94 111
95 </body> 112 </body>
96 </html> 113 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/debugger/script-formatter-breakpoints-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698