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

Side by Side Diff: LayoutTests/http/tests/inspector/elements/styles/stylesheet-tracking.html

Issue 177963004: DevTools: Split creating inspector stylesheet and adding a new rule into stylesheet in protocol. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comments addressed 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../inspector-test.js"></script> 3 <script src="../../inspector-test.js"></script>
4 <script src="../../elements-test.js"></script> 4 <script src="../../elements-test.js"></script>
5 <link rel="stylesheet" href="resources/stylesheet-tracking.css" /> 5 <link rel="stylesheet" href="resources/stylesheet-tracking.css" />
6 6
7 <style> 7 <style>
8 html { 8 html {
9 font-size: 12px; 9 font-size: 12px;
10 } 10 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 { 137 {
138 InspectorTest.addResult("=== Removing stylesheet... ==="); 138 InspectorTest.addResult("=== Removing stylesheet... ===");
139 waitStyleSheetRemoved(1, step4); 139 waitStyleSheetRemoved(1, step4);
140 InspectorTest.evaluateInPage("removeStyleSheet()"); 140 InspectorTest.evaluateInPage("removeStyleSheet()");
141 } 141 }
142 142
143 function step4() 143 function step4()
144 { 144 {
145 InspectorTest.addResult("=== Adding rule... ==="); 145 InspectorTest.addResult("=== Adding rule... ===");
146 waitStyleSheetAdded(1); 146 waitStyleSheetAdded(1);
147 WebInspector.cssModel.addRule(inspectedNode.id, "#inspected", successCal lback, failureCallback); 147 InspectorTest.addNewRule("#inspected", successCallback);
148 148
149 function successCallback() 149 function successCallback()
150 { 150 {
151 InspectorTest.addResult("Rule added"); 151 InspectorTest.addResult("Rule added");
152 step5(); 152 step5();
153 } 153 }
154 function failureCallback()
155 {
156 InspectorTest.addResult("Failed to add rule.");
157 InspectorTest.completeTest();
158 }
159 } 154 }
160 155
161 function step5() 156 function step5()
162 { 157 {
163 InspectorTest.addResult("=== Removing iframe... ==="); 158 InspectorTest.addResult("=== Removing iframe... ===");
164 InspectorTest.evaluateInPage("removeIframe()"); 159 InspectorTest.evaluateInPage("removeIframe()");
165 waitStyleSheetRemoved(1, step6); 160 waitStyleSheetRemoved(1, step6);
166 } 161 }
167 162
168 function step6() 163 function step6()
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 256
262 <body onload="runTest()"> 257 <body onload="runTest()">
263 <p> 258 <p>
264 Tests that the styleSheetAdded and styleSheetRemoved events are reported into th e frontend. <a href="https://bugs.webkit.org/show_bug.cgi?id=105828">Bug 105828< /a>. 259 Tests that the styleSheetAdded and styleSheetRemoved events are reported into th e frontend. <a href="https://bugs.webkit.org/show_bug.cgi?id=105828">Bug 105828< /a>.
265 </p> 260 </p>
266 261
267 <div id="inspected">Text</div> 262 <div id="inspected">Text</div>
268 263
269 </body> 264 </body>
270 </html> 265 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698