OLD | NEW |
---|---|
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> | 8 <script src="styles-test.js"></script> |
9 <script> | 9 <script> |
10 | 10 |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
289 | 289 |
290 function ruleAdded(error, rule) | 290 function ruleAdded(error, rule) |
291 { | 291 { |
292 if (error) { | 292 if (error) { |
293 InspectorTest.addResult("error: " + error); | 293 InspectorTest.addResult("error: " + error); |
294 return; | 294 return; |
295 } | 295 } |
296 CSSAgent.setPropertyText(rule.style.styleId, 0, "font-family: se rif;", false, didSetStyleText); | 296 CSSAgent.setPropertyText(rule.style.styleId, 0, "font-family: se rif;", false, didSetStyleText); |
297 } | 297 } |
298 | 298 |
299 CSSAgent.addRule(bodyId, "body", ruleAdded); | 299 function viaInspectorStyleSheetCreated(error, styleSheetId) |
300 { | |
301 if (error) { | |
302 InspectorTest.addResult("error: " + error); | |
lushnikov
2014/02/28 11:55:59
InspectorTest.completeTest() is needed here as wel
vsevik
2014/02/28 14:35:28
Done
| |
303 return; | |
304 } | |
305 CSSAgent.addRule(styleSheetId, "body", ruleAdded); | |
306 } | |
307 | |
308 var frameId = WebInspector.resourceTreeModel.mainFrame.id; | |
309 CSSAgent.createViaInspectorStyleSheet(frameId, viaInspectorStyleShee tCreated.bind(this)); | |
300 }, | 310 }, |
301 | 311 |
302 function test_disableProperty(next) | 312 function test_disableProperty(next) |
303 { | 313 { |
304 function didEnableProperty(style) | 314 function didEnableProperty(style) |
305 { | 315 { |
306 InspectorTest.addResult(""); | 316 InspectorTest.addResult(""); |
307 InspectorTest.addResult("=== After property enabled ==="); | 317 InspectorTest.addResult("=== After property enabled ==="); |
308 InspectorTest.dumpCSSStyleDeclaration(style); | 318 InspectorTest.dumpCSSStyleDeclaration(style); |
309 next(); | 319 next(); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
459 | 469 |
460 <body id="mainBody" class="main1 main2 mainpage" onload="runTest()" style="font- weight: normal; width: 85%; background-image: url(bar.png)"> | 470 <body id="mainBody" class="main1 main2 mainpage" onload="runTest()" style="font- weight: normal; width: 85%; background-image: url(bar.png)"> |
461 <p> | 471 <p> |
462 Tests that InspectorCSSAgent API methods work as expected. | 472 Tests that InspectorCSSAgent API methods work as expected. |
463 </p> | 473 </p> |
464 <table width="50%" id="thetable"> | 474 <table width="50%" id="thetable"> |
465 </table> | 475 </table> |
466 <h1 id="toggle">H1</h1> | 476 <h1 id="toggle">H1</h1> |
467 </body> | 477 </body> |
468 </html> | 478 </html> |
OLD | NEW |