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

Side by Side Diff: LayoutTests/inspector/styles/styles-new-API.html

Issue 148523012: DevTools: [CSS] remove getAllStylesheets method from protocol (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 3
4 <link rel="stylesheet" href="resources/styles-new-API.css"> 4 <link rel="stylesheet" href="resources/styles-new-API.css">
5 5
6 <script src="../../http/tests/inspector/inspector-test.js"></script> 6 <script src="../../http/tests/inspector/inspector-test.js"></script>
7 <script src="../../http/tests/inspector/elements-test.js"></script> 7 <script src="../../http/tests/inspector/elements-test.js"></script>
8 <script src="./styles-test.js"></script>
apavlov 2014/01/29 14:08:57 "./styles-test.js" -> "styles-test.js" will make s
lushnikov 2014/01/29 18:21:46 Done.
8 <script> 9 <script>
9 10
10 function test() 11 function test()
11 { 12 {
12 WebInspector.showPanel("elements"); 13 WebInspector.showPanel("elements");
13 14
14 test_styles(); 15 test_styles();
15 16
16 var bodyId; 17 var bodyId;
17 function test_styles(node) 18 function test_styles(node)
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 "}"; 190 "}";
190 191
191 function patchStyleSheet(styleSheet) 192 function patchStyleSheet(styleSheet)
192 { 193 {
193 InspectorTest.addResult(""); 194 InspectorTest.addResult("");
194 InspectorTest.addResult("=== Last stylesheet patched ==="); 195 InspectorTest.addResult("=== Last stylesheet patched ===");
195 CSSAgent.setStyleSheetText(styleSheet.styleSheetId, newStyleSheetTex t, 196 CSSAgent.setStyleSheetText(styleSheet.styleSheetId, newStyleSheetTex t,
196 loadAndDumpStyleSheet.bind(null, styleSheet.styleSheetId, test_c hangeSelector)); 197 loadAndDumpStyleSheet.bind(null, styleSheet.styleSheetId, test_c hangeSelector));
197 } 198 }
198 199
199 function styleSheetInfosLoaded(error, infos) 200 function styleSheetInfosLoaded(styleSheets)
200 { 201 {
201 if (error) {
202 InspectorTest.addResult("error: " + error);
203 return;
204 }
205 InspectorTest.addResult(""); 202 InspectorTest.addResult("");
206 InspectorTest.addResult("=== All stylesheets ==="); 203 InspectorTest.addResult("=== All stylesheets ===");
207 for (var i = 0; i < infos.length; ++i) 204 for (var i = 0; i < styleSheets.length; ++i)
208 loadAndDumpStyleSheet(infos[i].styleSheetId, (i < infos.length - 1) ? null : patchStyleSheet); 205 loadAndDumpStyleSheet(styleSheets[i].id, (i < styleSheets.length - 1) ? null : patchStyleSheet);
209 } 206 }
210 CSSAgent.getAllStyleSheets(styleSheetInfosLoaded); 207 InspectorTest.waitForStylesheetsOnFrontend(4, styleSheetInfosLoaded);
211 } 208 }
212 209
213 function test_changeSelector(styleSheet) 210 function test_changeSelector(styleSheet)
214 { 211 {
215 function didSetSelector(error, rule) 212 function didSetSelector(error, rule)
216 { 213 {
217 if (error) { 214 if (error) {
218 InspectorTest.addResult("error: " + error); 215 InspectorTest.addResult("error: " + error);
219 return; 216 return;
220 } 217 }
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 402
406 <body id="mainBody" class="main1 main2 mainpage" onload="runTest()" style="font- weight: normal; width: 85%; background-image: url(bar.png)"> 403 <body id="mainBody" class="main1 main2 mainpage" onload="runTest()" style="font- weight: normal; width: 85%; background-image: url(bar.png)">
407 <p> 404 <p>
408 Tests that InspectorCSSAgent API methods work as expected. 405 Tests that InspectorCSSAgent API methods work as expected.
409 </p> 406 </p>
410 <table width="50%" id="thetable"> 407 <table width="50%" id="thetable">
411 </table> 408 </table>
412 <h1 id="toggle">H1</h1> 409 <h1 id="toggle">H1</h1>
413 </body> 410 </body>
414 </html> 411 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698