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

Side by Side Diff: LayoutTests/fast/css/deep-cascade-order.html

Issue 1322753006: Add inline style in the element's scope. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/fast/css/deep-cascade-order-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script> 2 <script src="../../resources/js-test.js"></script>
3 <style> 3 <style>
4 .host1 /deep/ div { color: green } 4 .host1 /deep/ div { color: green }
5 #host2 /deep/ div { color: red !important } 5 #host2 /deep/ div { color: red !important }
6 </style> 6 </style>
7 <div id="host1" class="host1"></div> 7 <div id="host1" class="host1"></div>
8 <div id="host2" class="host2"></div> 8 <div id="host2" class="host2"></div>
9 <script> 9 <script>
10 description("Cascade order for inner/outer tree rules with /deep/."); 10 description("Cascade order for inner/outer tree rules with /deep/.");
11 11
12 var root1 = host1.createShadowRoot(); 12 var root1 = host1.createShadowRoot();
13 root1.innerHTML = '<style>#d1 {color:red}</style><div id="d1">Should be gree n</div><div style="color: red">Should be green</div>'; 13 root1.innerHTML = '<style>#d1 {color:red}</style><div id="d1">Should be gree n</div><div style="color: red">Should be green</div>';
14 14
15 var root2 = host2.createShadowRoot(); 15 var root2 = host2.createShadowRoot();
16 root2.innerHTML = '<style>.d1 {color:green !important}</style><div class="d1 ">Should be green</div><div style="color: green !important">Should be green</div >'; 16 root2.innerHTML = '<style>.d1 {color:green !important}</style><div class="d1 ">Should be green</div><div style="color: green !important">Should be green</div >';
17 17
18 var green = "rgb(0, 128, 0)"; 18 var green = "rgb(0, 128, 0)";
19 19
20 shouldBe("getComputedStyle(root1.querySelector('div')).color", "green"); 20 shouldBe("getComputedStyle(root1.querySelector('div')).color", "green");
21
22 debug("TODO(rune@opera.com): Currently fails because style attributes are ad ded to the end, not in its element's scope's cascade order");
23 shouldBe("getComputedStyle(root1.querySelector('div + div')).color", "green" ); 21 shouldBe("getComputedStyle(root1.querySelector('div + div')).color", "green" );
24
25 shouldBe("getComputedStyle(root2.querySelector('div')).color", "green"); 22 shouldBe("getComputedStyle(root2.querySelector('div')).color", "green");
26
27 debug("TODO(rune@opera.com): Currently fails because style attributes are ad ded to the end, not in its element's scope's cascade order");
28 shouldBe("getComputedStyle(root2.querySelector('div + div')).color", "green" ); 23 shouldBe("getComputedStyle(root2.querySelector('div + div')).color", "green" );
29 </script> 24 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css/deep-cascade-order-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698