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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-frameworks/frameworks-dom-xhr-event-breakpoints.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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
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/elements-test.js"></script> 4 <script src="../../../http/tests/inspector/elements-test.js"></script>
5 <script src="../../../http/tests/inspector/debugger-test.js"></script> 5 <script src="../../../http/tests/inspector/debugger-test.js"></script>
6 <script src="../debugger/resources/framework.js"></script> 6 <script src="../debugger/resources/framework.js"></script>
7 <script> 7 <script>
8 8
9 function appendElement(parentId, childId) 9 function appendElement(parentId, childId)
10 { 10 {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 remover2(); 66 remover2();
67 remover3(); 67 remover3();
68 remover4(); 68 remover4();
69 } 69 }
70 return inner(); 70 return inner();
71 } 71 }
72 72
73 function test() 73 function test()
74 { 74 {
75 var frameworkRegexString = "/framework\\.js$"; 75 var frameworkRegexString = "/framework\\.js$";
76 WebInspector.settingForTest("skipStackFramesPattern").set(frameworkRegexStri ng); 76 Common.settingForTest("skipStackFramesPattern").set(frameworkRegexString);
77 77
78 InspectorTest.setQuiet(true); 78 InspectorTest.setQuiet(true);
79 79
80 InspectorTest.runDebuggerTestSuite([ 80 InspectorTest.runDebuggerTestSuite([
81 function testDOMBreakpoint(next) 81 function testDOMBreakpoint(next)
82 { 82 {
83 InspectorTest.nodeWithId("rootElement", step1); 83 InspectorTest.nodeWithId("rootElement", step1);
84 84
85 function step1(node) 85 function step1(node)
86 { 86 {
87 var pane = WebInspector.domBreakpointsSidebarPane; 87 var pane = Components.domBreakpointsSidebarPane;
88 pane._setBreakpoint(node, WebInspector.DOMBreakpointsSidebarPane .BreakpointTypes.SubtreeModified, true); 88 pane._setBreakpoint(node, Components.DOMBreakpointsSidebarPane.B reakpointTypes.SubtreeModified, true);
89 InspectorTest.evaluateInPageWithTimeout("appendElement('rootElem ent', 'childElement')"); 89 InspectorTest.evaluateInPageWithTimeout("appendElement('rootElem ent', 'childElement')");
90 InspectorTest.waitUntilPausedAndDumpStackAndResume(next); 90 InspectorTest.waitUntilPausedAndDumpStackAndResume(next);
91 } 91 }
92 }, 92 },
93 93
94 function testXHRBreakpoint(next) 94 function testXHRBreakpoint(next)
95 { 95 {
96 var pane = self.runtime.sharedInstance(WebInspector.XHRBreakpointsSi debarPane); 96 var pane = self.runtime.sharedInstance(Sources.XHRBreakpointsSidebar Pane);
97 pane._setBreakpoint("foo", true); 97 pane._setBreakpoint("foo", true);
98 InspectorTest.evaluateInPageWithTimeout("sendXHR('file:///foo?a=b')" ); 98 InspectorTest.evaluateInPageWithTimeout("sendXHR('file:///foo?a=b')" );
99 InspectorTest.waitUntilPausedAndDumpStackAndResume(next); 99 InspectorTest.waitUntilPausedAndDumpStackAndResume(next);
100 }, 100 },
101 101
102 function testEventListenerBreakpoint(next) 102 function testEventListenerBreakpoint(next)
103 { 103 {
104 var pane = self.runtime.sharedInstance(WebInspector.EventListenerBre akpointsSidebarPane); 104 var pane = self.runtime.sharedInstance(Sources.EventListenerBreakpoi ntsSidebarPane);
105 pane._setBreakpoint("listener:click"); 105 pane._setBreakpoint("listener:click");
106 InspectorTest.evaluateInPageWithTimeout("addListenerAndClick(false)" ); 106 InspectorTest.evaluateInPageWithTimeout("addListenerAndClick(false)" );
107 InspectorTest.waitUntilPausedAndPerformSteppingActions([ 107 InspectorTest.waitUntilPausedAndPerformSteppingActions([
108 "Print", "Resume", 108 "Print", "Resume",
109 "Print", "Resume", 109 "Print", "Resume",
110 ], next); 110 ], next);
111 }, 111 },
112 112
113 function testSteppingThroughEventListenerBreakpoint(next) 113 function testSteppingThroughEventListenerBreakpoint(next)
114 { 114 {
115 var pane = self.runtime.sharedInstance(WebInspector.EventListenerBre akpointsSidebarPane); 115 var pane = self.runtime.sharedInstance(Sources.EventListenerBreakpoi ntsSidebarPane);
116 pane._setBreakpoint("listener:click"); 116 pane._setBreakpoint("listener:click");
117 InspectorTest.evaluateInPageWithTimeout("addListenerAndClick(true)") ; 117 InspectorTest.evaluateInPageWithTimeout("addListenerAndClick(true)") ;
118 InspectorTest.waitUntilPausedAndPerformSteppingActions([ 118 InspectorTest.waitUntilPausedAndPerformSteppingActions([
119 "StepOver", "Print", 119 "StepOver", "Print",
120 "StepOver", "Print", // should break at the first "remover()" 120 "StepOver", "Print", // should break at the first "remover()"
121 "StepOver", "StepOver", "StepOver", "Print", // enter testElemen tClicked() 121 "StepOver", "StepOver", "StepOver", "Print", // enter testElemen tClicked()
122 "StepOut", "StepOver", "StepOver", "StepOver", "StepOver", "Prin t", // enter testElementClicked() 122 "StepOut", "StepOver", "StepOver", "StepOver", "StepOver", "Prin t", // enter testElementClicked()
123 "StepOver", "StepOver", "Print", 123 "StepOver", "StepOver", "Print",
124 "Resume", 124 "Resume",
125 ], next); 125 ], next);
126 }, 126 },
127 127
128 function testSteppingOutOnEventListenerBreakpoint(next) 128 function testSteppingOutOnEventListenerBreakpoint(next)
129 { 129 {
130 var pane = self.runtime.sharedInstance(WebInspector.EventListenerBre akpointsSidebarPane); 130 var pane = self.runtime.sharedInstance(Sources.EventListenerBreakpoi ntsSidebarPane);
131 pane._setBreakpoint("listener:click"); 131 pane._setBreakpoint("listener:click");
132 InspectorTest.evaluateInPageWithTimeout("addListenerAndClick(true)") ; 132 InspectorTest.evaluateInPageWithTimeout("addListenerAndClick(true)") ;
133 InspectorTest.waitUntilPausedAndPerformSteppingActions([ 133 InspectorTest.waitUntilPausedAndPerformSteppingActions([
134 "StepOut", "Print", // should be in testElementClicked() 134 "StepOut", "Print", // should be in testElementClicked()
135 "StepOut", "StepOut", "Print", // again in testElementClicked() 135 "StepOut", "StepOut", "Print", // again in testElementClicked()
136 "StepOut", "Print", 136 "StepOut", "Print",
137 "Resume", 137 "Resume",
138 ], next); 138 ], next);
139 }, 139 },
140 140
141 function testSteppingOutOnEventListenerBreakpointAllBlackboxed(next) 141 function testSteppingOutOnEventListenerBreakpointAllBlackboxed(next)
142 { 142 {
143 var pane = self.runtime.sharedInstance(WebInspector.EventListenerBre akpointsSidebarPane); 143 var pane = self.runtime.sharedInstance(Sources.EventListenerBreakpoi ntsSidebarPane);
144 pane._setBreakpoint("listener:click"); 144 pane._setBreakpoint("listener:click");
145 InspectorTest.evaluateInPageWithTimeout("addFewBlackboxedListenersAn dClick(false)"); 145 InspectorTest.evaluateInPageWithTimeout("addFewBlackboxedListenersAn dClick(false)");
146 InspectorTest.waitUntilPausedAndPerformSteppingActions([ 146 InspectorTest.waitUntilPausedAndPerformSteppingActions([
147 "StepOut", "Print", 147 "StepOut", "Print",
148 "Resume", 148 "Resume",
149 ], next); 149 ], next);
150 }, 150 },
151 151
152 function testSteppingOutOnEventListenerBreakpointAllBlackboxedButOne(nex t) 152 function testSteppingOutOnEventListenerBreakpointAllBlackboxedButOne(nex t)
153 { 153 {
154 var pane = self.runtime.sharedInstance(WebInspector.EventListenerBre akpointsSidebarPane); 154 var pane = self.runtime.sharedInstance(Sources.EventListenerBreakpoi ntsSidebarPane);
155 pane._setBreakpoint("listener:click"); 155 pane._setBreakpoint("listener:click");
156 InspectorTest.evaluateInPageWithTimeout("addFewBlackboxedListenersAn dClick(true)"); 156 InspectorTest.evaluateInPageWithTimeout("addFewBlackboxedListenersAn dClick(true)");
157 InspectorTest.waitUntilPausedAndPerformSteppingActions([ 157 InspectorTest.waitUntilPausedAndPerformSteppingActions([
158 "StepOut", "Print", 158 "StepOut", "Print",
159 "StepOut", "Print", 159 "StepOut", "Print",
160 "StepOut", "Print", 160 "StepOut", "Print",
161 "Resume", 161 "Resume",
162 ], next); 162 ], next);
163 }, 163 },
164 164
165 function tearDown(next) 165 function tearDown(next)
166 { 166 {
167 self.runtime.sharedInstance(WebInspector.XHRBreakpointsSidebarPane). _removeBreakpoint("foo"); 167 self.runtime.sharedInstance(Sources.XHRBreakpointsSidebarPane)._remo veBreakpoint("foo");
168 self.runtime.sharedInstance(WebInspector.EventListenerBreakpointsSid ebarPane)._removeBreakpoint("listener:click"); 168 self.runtime.sharedInstance(Sources.EventListenerBreakpointsSidebarP ane)._removeBreakpoint("listener:click");
169 next(); 169 next();
170 } 170 }
171 ]); 171 ]);
172 } 172 }
173 173
174 </script> 174 </script>
175 </head> 175 </head>
176 176
177 <body onload="runTest()"> 177 <body onload="runTest()">
178 <p> 178 <p>
179 Tests framework black-boxing on DOM, XHR and Event breakpoints. 179 Tests framework black-boxing on DOM, XHR and Event breakpoints.
180 </p> 180 </p>
181 <div id="rootElement"></div> 181 <div id="rootElement"></div>
182 <input type=button id="test"></input> 182 <input type=button id="test"></input>
183 </body> 183 </body>
184 </html> 184 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698