| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="resources/polyfill.js"></script> | |
| 5 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../js/resources/js-test-pre.js"></script> |
| 6 </head> | 5 </head> |
| 7 <body> | 6 <body> |
| 8 <div id="host">This div is a shadow host.</div> | 7 <div id="host">This div is a shadow host.</div> |
| 9 </body> | 8 </body> |
| 10 <script> | 9 <script> |
| 11 description("Test whether CSSHostRule API works correctly or not."); | 10 description("Test whether CSSHostRule API works correctly or not."); |
| 12 var host = document.getElementById('host'); | 11 var host = document.getElementById('host'); |
| 13 var shadowRoot = host.webkitCreateShadowRoot(); | 12 var shadowRoot = host.webkitCreateShadowRoot(); |
| 14 shadowRoot.innerHTML = '<style id="style1">@host {}</style><div>Shadow Text</div
>'; | 13 shadowRoot.innerHTML = '<style id="style1">@host {}</style><div>Shadow Text</div
>'; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 39 debug("After deleting the border rule with an id selector from @host @-rules:"); | 38 debug("After deleting the border rule with an id selector from @host @-rules:"); |
| 40 hostRule.deleteRule(0); | 39 hostRule.deleteRule(0); |
| 41 shouldBe("getComputedStyle(host).borderColor", '"rgb(0, 0, 255)"'); | 40 shouldBe("getComputedStyle(host).borderColor", '"rgb(0, 0, 255)"'); |
| 42 shouldBe("hostRule.cssRules.length", '1'); | 41 shouldBe("hostRule.cssRules.length", '1'); |
| 43 shouldBe("hostRule.cssText", '"@host { \\n div { border-color: blue; }\\n}"'); | 42 shouldBe("hostRule.cssText", '"@host { \\n div { border-color: blue; }\\n}"'); |
| 44 shouldBe("hostRule.cssRules[0].cssText", '"div { border-color: blue; }"'); | 43 shouldBe("hostRule.cssRules[0].cssText", '"div { border-color: blue; }"'); |
| 45 | 44 |
| 46 </script> | 45 </script> |
| 47 <script src="../../js/resources/js-test-post.js"></script> | 46 <script src="../../js/resources/js-test-post.js"></script> |
| 48 </html> | 47 </html> |
| OLD | NEW |