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

Side by Side Diff: LayoutTests/fast/dom/shadow/css-hostrule-api.html

Issue 14594006: Remove Internals::createShadowRoot(element) and polyfill.js. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 <!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
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698