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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/styles-2/pseudo-elements.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 <style> 3 <style>
4 #inspected:before, .some-other-selector { 4 #inspected:before, .some-other-selector {
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 selectNodeAndDumpStyles("inspected", "before", next); 81 selectNodeAndDumpStyles("inspected", "before", next);
82 }, 82 },
83 83
84 function dumpAfterStyles(next) 84 function dumpAfterStyles(next)
85 { 85 {
86 selectNodeAndDumpStyles("inspected", "after", next); 86 selectNodeAndDumpStyles("inspected", "after", next);
87 }, 87 },
88 88
89 function removeAfter(next) 89 function removeAfter(next)
90 { 90 {
91 executeAndDumpTree("removeLastRule()", WebInspector.DOMModel.Events. NodeRemoved, next); 91 executeAndDumpTree("removeLastRule()", SDK.DOMModel.Events.NodeRemov ed, next);
92 }, 92 },
93 93
94 function removeBefore(next) 94 function removeBefore(next)
95 { 95 {
96 executeAndDumpTree("removeLastRule()", WebInspector.DOMModel.Events. NodeRemoved, next); 96 executeAndDumpTree("removeLastRule()", SDK.DOMModel.Events.NodeRemov ed, next);
97 }, 97 },
98 98
99 function addAfter(next) 99 function addAfter(next)
100 { 100 {
101 executeAndDumpTree("addAfterRule()", WebInspector.DOMModel.Events.No deInserted, expandAndDumpTree.bind(this, next)); 101 executeAndDumpTree("addAfterRule()", SDK.DOMModel.Events.NodeInserte d, expandAndDumpTree.bind(this, next));
102 }, 102 },
103 103
104 function addBefore(next) 104 function addBefore(next)
105 { 105 {
106 executeAndDumpTree("addBeforeRule()", WebInspector.DOMModel.Events.N odeInserted, next); 106 executeAndDumpTree("addBeforeRule()", SDK.DOMModel.Events.NodeInsert ed, next);
107 }, 107 },
108 108
109 function modifyTextContent(next) 109 function modifyTextContent(next)
110 { 110 {
111 executeAndDumpTree("modifyTextContent()", WebInspector.DOMModel.Even ts.NodeInserted, next); 111 executeAndDumpTree("modifyTextContent()", SDK.DOMModel.Events.NodeIn serted, next);
112 }, 112 },
113 113
114 function clearTextContent(next) 114 function clearTextContent(next)
115 { 115 {
116 executeAndDumpTree("clearTextContent()", WebInspector.DOMModel.Event s.NodeRemoved, next); 116 executeAndDumpTree("clearTextContent()", SDK.DOMModel.Events.NodeRem oved, next);
117 }, 117 },
118 118
119 function removeNodeAndCheckPseudoElementsUnbound(next) 119 function removeNodeAndCheckPseudoElementsUnbound(next)
120 { 120 {
121 var inspectedBefore = inspectedNode.beforePseudoElement(); 121 var inspectedBefore = inspectedNode.beforePseudoElement();
122 var inspectedAfter = inspectedNode.afterPseudoElement(); 122 var inspectedAfter = inspectedNode.afterPseudoElement();
123 123
124 executeAndDumpTree("removeNode()", WebInspector.DOMModel.Events.Node Removed, callback); 124 executeAndDumpTree("removeNode()", SDK.DOMModel.Events.NodeRemoved, callback);
125 function callback() 125 function callback()
126 { 126 {
127 InspectorTest.addResult("inspected:before DOMNode in DOMAgent: " + !!(InspectorTest.domModel.nodeForId(inspectedBefore.id))); 127 InspectorTest.addResult("inspected:before DOMNode in DOMAgent: " + !!(InspectorTest.domModel.nodeForId(inspectedBefore.id)));
128 InspectorTest.addResult("inspected:after DOMNode in DOMAgent: " + !!(InspectorTest.domModel.nodeForId(inspectedAfter.id))); 128 InspectorTest.addResult("inspected:after DOMNode in DOMAgent: " + !!(InspectorTest.domModel.nodeForId(inspectedAfter.id)));
129 next(); 129 next();
130 } 130 }
131 } 131 }
132 ]); 132 ]);
133 133
134 function executeAndDumpTree(pageFunction, eventName, next) 134 function executeAndDumpTree(pageFunction, eventName, next)
135 { 135 {
136 InspectorTest.domModel.addEventListener(eventName, domCallback, this); 136 InspectorTest.domModel.addEventListener(eventName, domCallback, this);
137 InspectorTest.evaluateInPage(pageFunction); 137 InspectorTest.evaluateInPage(pageFunction);
138 138
139 function domCallback() 139 function domCallback()
140 { 140 {
141 InspectorTest.domModel.removeEventListener(eventName, domCallback, t his); 141 InspectorTest.domModel.removeEventListener(eventName, domCallback, t his);
142 InspectorTest.firstElementsTreeOutline().addEventListener(WebInspect or.ElementsTreeOutline.Events.ElementsTreeUpdated, treeCallback, this); 142 InspectorTest.firstElementsTreeOutline().addEventListener(Elements.E lementsTreeOutline.Events.ElementsTreeUpdated, treeCallback, this);
143 } 143 }
144 144
145 function treeCallback() 145 function treeCallback()
146 { 146 {
147 InspectorTest.firstElementsTreeOutline().removeEventListener(WebInsp ector.ElementsTreeOutline.Events.ElementsTreeUpdated, treeCallback, this); 147 InspectorTest.firstElementsTreeOutline().removeEventListener(Element s.ElementsTreeOutline.Events.ElementsTreeUpdated, treeCallback, this);
148 InspectorTest.dumpElementsTree(containerNode); 148 InspectorTest.dumpElementsTree(containerNode);
149 next(); 149 next();
150 } 150 }
151 } 151 }
152 152
153 function expandAndDumpTree(next) 153 function expandAndDumpTree(next)
154 { 154 {
155 InspectorTest.addResult("== Expanding: =="); 155 InspectorTest.addResult("== Expanding: ==");
156 InspectorTest.expandElementsTree(callback); 156 InspectorTest.expandElementsTree(callback);
157 function callback() 157 function callback()
(...skipping 26 matching lines...) Expand all
184 Tests that pseudo elements and their styles are handled properly. 184 Tests that pseudo elements and their styles are handled properly.
185 </p> 185 </p>
186 186
187 <div id="container"> 187 <div id="container">
188 <div id="inspected">Text</div> 188 <div id="inspected">Text</div>
189 <div id="empty"></div> 189 <div id="empty"></div>
190 </div> 190 </div>
191 191
192 </body> 192 </body>
193 </html> 193 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698