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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/distribution-update-recalcs-style.html

Issue 2266353004: Make Document::styleForElementIgnoringPendingStyleSheets() be aware of a flat tree structure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update the test Created 4 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script> 5 <script>
6 function getColorProperty(id) { 6 function getColorProperty(id) {
7 return window.getComputedStyle(document.getElementById(id)).color; 7 return window.getComputedStyle(document.getElementById(id)).color;
8 } 8 }
9 9
10 function log(message) { 10 function log(message) {
(...skipping 10 matching lines...) Expand all
21 <span id="span-child"></span> 21 <span id="span-child"></span>
22 </div> 22 </div>
23 </div> 23 </div>
24 <script> 24 <script>
25 description("Tests to ensure that updating the select rule in projection causes style recalc."); 25 description("Tests to ensure that updating the select rule in projection causes style recalc.");
26 26
27 var sr = document.getElementById("host").createShadowRoot(); 27 var sr = document.getElementById("host").createShadowRoot();
28 sr.innerHTML = '<style>div { color: blue }</style><div><content id="contentId" s elect="#div-child"></content></div>'; 28 sr.innerHTML = '<style>div { color: blue }</style><div><content id="contentId" s elect="#div-child"></content></div>';
29 29
30 shouldBe('getColorProperty("div-child")', '"rgb(0, 0, 255)"'); 30 shouldBe('getColorProperty("div-child")', '"rgb(0, 0, 255)"');
31 shouldBe('getColorProperty("span-child")', '"rgb(255, 0, 0)"'); 31 shouldBe('getColorProperty("span-child")', '"rgb(0, 0, 0)"');
32 32
33 sr.getElementById("contentId").select = "#span-child"; 33 sr.getElementById("contentId").select = "#span-child";
34 shouldBe('getColorProperty("div-child")', '"rgb(255, 0, 0)"'); 34 shouldBe('getColorProperty("div-child")', '"rgb(0, 0, 0)"');
35 shouldBe('getColorProperty("span-child")', '"rgb(0, 0, 255)"'); 35 shouldBe('getColorProperty("span-child")', '"rgb(0, 0, 255)"');
36 36
37 if (window.testRunner) 37 if (window.testRunner)
38 testRunner.notifyDone(); 38 testRunner.notifyDone();
39 </script> 39 </script>
40 </body> 40 </body>
41 </html> 41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698