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

Side by Side Diff: LayoutTests/fast/css/style-scoped/style-scoped-in-shadow.html

Issue 310443002: Remove scoped styles. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase for CQ Created 6 years, 6 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 <script>
6 description("Tests that <style scoped> is correctly applied as child of a Sh adowRoot, and that it doesn't leak out. Can only run within DRT.");
7
8 function test()
9 {
10 if (window.testRunner)
11 testRunner.dumpAsText();
12
13 var a = document.getElementById("A");
14 var b = document.getElementById("B");
15 shadow = b.createShadowRoot();
16 shouldBeDefined("shadow.innerHTML");
17 shouldBeDefined("shadow.getElementById");
18 shadow.innerHTML = "<style scoped>div { color: red; }</style><content></ content><div id='C'>CCC</div>";
19 var c = shadow.getElementById("C");
20 var d = document.getElementById("D");
21
22 debug("A: " + document.defaultView.getComputedStyle(a, null).getProperty Value('color')); /* black */
23 debug("B: " + document.defaultView.getComputedStyle(b, null).getProperty Value('color')); /* red */
24 debug("C: " + document.defaultView.getComputedStyle(c, null).getProperty Value('color')); /* red */
25 debug("D: " + document.defaultView.getComputedStyle(d, null).getProperty Value('color')); /* black */
26 }
27 </script>
28 </head>
29 <body>
30 <div id="A">
31 AAA
32 </div>
33 <div id="B">
34 BBB
35 </div>
36 <div id="D">
37 DDD
38 </div>
39 <script>test();</script>
40 </body>
41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698