| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <div id="host">This div is a shadow host.</div> | 7 <div id="host">This div is a shadow host.</div> |
| 8 </body> | 8 </body> |
| 9 <script> | 9 <script> |
| 10 description("Test whether CSSHostRule API works correctly or not."); | 10 description("Test whether CSSHostRule API works correctly or not."); |
| 11 var host = document.getElementById('host'); | 11 var host = document.getElementById('host'); |
| 12 var shadowRoot = host.createShadowRoot(); | 12 var shadowRoot = host.createShadowRoot(); |
| 13 shadowRoot.innerHTML = '<style id="style1">@host {}</style><div>Shadow Text</div
>'; | 13 shadowRoot.innerHTML = '<style id="style1">@host {}</style><div>Shadow Text</div
>'; |
| 14 | 14 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 shouldBe("hostRule.cssRules.length", '1'); | 46 shouldBe("hostRule.cssRules.length", '1'); |
| 47 shouldThrow("hostRule.insertRule('#host { border-color: green; }')", '"TypeError
: Failed to execute \'insertRule\' on \'CSSHostRule\': 2 arguments required, but
only 1 present."'); | 47 shouldThrow("hostRule.insertRule('#host { border-color: green; }')", '"TypeError
: Failed to execute \'insertRule\' on \'CSSHostRule\': 2 arguments required, but
only 1 present."'); |
| 48 shouldBe("hostRule.cssRules.length", '1'); | 48 shouldBe("hostRule.cssRules.length", '1'); |
| 49 shouldThrow("hostRule.insertRule()", '"TypeError: Failed to execute \'insertRule
\' on \'CSSHostRule\': 2 arguments required, but only 1 present."'); | 49 shouldThrow("hostRule.insertRule()", '"TypeError: Failed to execute \'insertRule
\' on \'CSSHostRule\': 2 arguments required, but only 1 present."'); |
| 50 shouldBe("hostRule.cssRules.length", '1'); | 50 shouldBe("hostRule.cssRules.length", '1'); |
| 51 shouldThrow("hostRule.deleteRule()", '"TypeError: Failed to execute \'deleteRule
\' on \'CSSHostRule\': 1 argument required, but only 0 present."'); | 51 shouldThrow("hostRule.deleteRule()", '"TypeError: Failed to execute \'deleteRule
\' on \'CSSHostRule\': 1 argument required, but only 0 present."'); |
| 52 shouldBe("hostRule.cssRules.length", '1'); | 52 shouldBe("hostRule.cssRules.length", '1'); |
| 53 | 53 |
| 54 </script> | 54 </script> |
| 55 </html> | 55 </html> |
| OLD | NEW |