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

Side by Side Diff: LayoutTests/inspector/elements/styles/pseudo-elements.html

Issue 206313004: DevTools: Rename WebInspector.DOMAgent into WebInspector.DOMModel (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 6 years, 9 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <style> 3 <style>
4 #inspected:before { 4 #inspected:before {
5 content: "BEFORE"; 5 content: "BEFORE";
6 } 6 }
7 7
8 #inspected:after { 8 #inspected:after {
9 content: "AFTER"; 9 content: "AFTER";
10 } 10 }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 selectNodeAndDumpStyles("inspected", "before", next); 136 selectNodeAndDumpStyles("inspected", "before", next);
137 }, 137 },
138 138
139 function dumpAfterStyles(next) 139 function dumpAfterStyles(next)
140 { 140 {
141 selectNodeAndDumpStyles("inspected", "after", next); 141 selectNodeAndDumpStyles("inspected", "after", next);
142 }, 142 },
143 143
144 function removeAfter(next) 144 function removeAfter(next)
145 { 145 {
146 executeAndDumpTree("removeLastRule()", WebInspector.DOMAgent.Events. NodeRemoved, next); 146 executeAndDumpTree("removeLastRule()", WebInspector.DOMModel.Events. NodeRemoved, next);
147 }, 147 },
148 148
149 function removeBefore(next) 149 function removeBefore(next)
150 { 150 {
151 executeAndDumpTree("removeLastRule()", WebInspector.DOMAgent.Events. NodeRemoved, next); 151 executeAndDumpTree("removeLastRule()", WebInspector.DOMModel.Events. NodeRemoved, next);
152 }, 152 },
153 153
154 function addAfter(next) 154 function addAfter(next)
155 { 155 {
156 executeAndDumpTree("addAfterRule()", WebInspector.DOMAgent.Events.No deInserted, next); 156 executeAndDumpTree("addAfterRule()", WebInspector.DOMModel.Events.No deInserted, next);
157 }, 157 },
158 158
159 function addBefore(next) 159 function addBefore(next)
160 { 160 {
161 executeAndDumpTree("addBeforeRule()", WebInspector.DOMAgent.Events.N odeInserted, next); 161 executeAndDumpTree("addBeforeRule()", WebInspector.DOMModel.Events.N odeInserted, next);
162 }, 162 },
163 163
164 function modifyTextContent(next) 164 function modifyTextContent(next)
165 { 165 {
166 executeAndDumpTree("modifyTextContent()", WebInspector.DOMAgent.Even ts.NodeInserted, next); 166 executeAndDumpTree("modifyTextContent()", WebInspector.DOMModel.Even ts.NodeInserted, next);
167 }, 167 },
168 168
169 function clearTextContent(next) 169 function clearTextContent(next)
170 { 170 {
171 executeAndDumpTree("clearTextContent()", WebInspector.DOMAgent.Event s.NodeRemoved, next); 171 executeAndDumpTree("clearTextContent()", WebInspector.DOMModel.Event s.NodeRemoved, next);
172 }, 172 },
173 173
174 function removeNodeAndCheckPseudoElementsUnbound(next) 174 function removeNodeAndCheckPseudoElementsUnbound(next)
175 { 175 {
176 var inspectedBefore = inspectedNode.pseudoElements()["before"]; 176 var inspectedBefore = inspectedNode.pseudoElements()["before"];
177 var inspectedAfter = inspectedNode.pseudoElements()["after"]; 177 var inspectedAfter = inspectedNode.pseudoElements()["after"];
178 178
179 executeAndDumpTree("removeNode()", WebInspector.DOMAgent.Events.Node Removed, callback); 179 executeAndDumpTree("removeNode()", WebInspector.DOMModel.Events.Node Removed, callback);
180 function callback() 180 function callback()
181 { 181 {
182 InspectorTest.addResult("inspected:before DOMNode in DOMAgent: " + !!(WebInspector.domAgent.nodeForId(inspectedBefore.id))); 182 InspectorTest.addResult("inspected:before DOMNode in DOMAgent: " + !!(WebInspector.domModel.nodeForId(inspectedBefore.id)));
183 InspectorTest.addResult("inspected:after DOMNode in DOMAgent: " + !!(WebInspector.domAgent.nodeForId(inspectedAfter.id))); 183 InspectorTest.addResult("inspected:after DOMNode in DOMAgent: " + !!(WebInspector.domModel.nodeForId(inspectedAfter.id)));
184 next(); 184 next();
185 } 185 }
186 } 186 }
187 ]); 187 ]);
188 188
189 function executeAndDumpTree(pageFunction, eventName, next) 189 function executeAndDumpTree(pageFunction, eventName, next)
190 { 190 {
191 WebInspector.domAgent.addEventListener(eventName, domCallback, this); 191 WebInspector.domModel.addEventListener(eventName, domCallback, this);
192 InspectorTest.evaluateInPage(pageFunction); 192 InspectorTest.evaluateInPage(pageFunction);
193 193
194 function domCallback() 194 function domCallback()
195 { 195 {
196 WebInspector.domAgent.removeEventListener(eventName, domCallback, th is); 196 WebInspector.domModel.removeEventListener(eventName, domCallback, th is);
197 WebInspector.inspectorView.panel("elements").treeOutline.addEventLis tener(WebInspector.ElementsTreeOutline.Events.ElementsTreeUpdated, treeCallback, this); 197 WebInspector.inspectorView.panel("elements").treeOutline.addEventLis tener(WebInspector.ElementsTreeOutline.Events.ElementsTreeUpdated, treeCallback, this);
198 } 198 }
199 199
200 function treeCallback() 200 function treeCallback()
201 { 201 {
202 WebInspector.inspectorView.panel("elements").treeOutline.removeEvent Listener(WebInspector.ElementsTreeOutline.Events.ElementsTreeUpdated, treeCallba ck, this); 202 WebInspector.inspectorView.panel("elements").treeOutline.removeEvent Listener(WebInspector.ElementsTreeOutline.Events.ElementsTreeUpdated, treeCallba ck, this);
203 InspectorTest.dumpElementsTree(containerNode); 203 InspectorTest.dumpElementsTree(containerNode);
204 next(); 204 next();
205 } 205 }
206 } 206 }
(...skipping 21 matching lines...) Expand all
228 Tests that pseudo elements and their styles are handled properly. 228 Tests that pseudo elements and their styles are handled properly.
229 </p> 229 </p>
230 230
231 <div id="container"> 231 <div id="container">
232 <div id="inspected">Text</div> 232 <div id="inspected">Text</div>
233 <div id="empty"></div> 233 <div id="empty"></div>
234 </div> 234 </div>
235 235
236 </body> 236 </body>
237 </html> 237 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698