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

Side by Side Diff: LayoutTests/fast/css/invalidation/targeted-class-host-pseudo.html

Issue 1317533002: Sibling invalidation sets (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review feedback 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script> 2 <script src="../../../resources/js-test.js"></script>
3 <div id="host1"></div> 3 <div id="host1"></div>
4 <div id="host2"></div> 4 <div id="host2"></div>
5 <div id="host3" class="c3"></div> 5 <div id="host3" class="c3"></div>
6 <div id="host4"></div> 6 <div id="host4"></div>
7 <script> 7 <script>
8 description("Check that targeted class invalidation works with the :host pseudo class."); 8 description("Check that targeted class invalidation works with the :host pseudo class.");
9 9
10 // Create shadow trees 10 // Create shadow trees
(...skipping 24 matching lines...) Expand all
35 35
36 host1.className = "c1"; 36 host1.className = "c1";
37 if (window.internals) 37 if (window.internals)
38 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); 38 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
39 shouldBe("getComputedStyle(host1, null).backgroundColor", "green"); 39 shouldBe("getComputedStyle(host1, null).backgroundColor", "green");
40 40
41 document.body.offsetLeft; // force style recalc. 41 document.body.offsetLeft; // force style recalc.
42 42
43 host2.className = "c2"; 43 host2.className = "c2";
44 if (window.internals) 44 if (window.internals)
45 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); 45 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
46 shouldBe("getComputedStyle(inner, null).backgroundColor", "green"); 46 shouldBe("getComputedStyle(inner, null).backgroundColor", "green");
47 47
48 document.body.offsetLeft; // force style recalc. 48 document.body.offsetLeft; // force style recalc.
49 49
50 host3.className = ""; 50 host3.className = "";
51 if (window.internals) 51 if (window.internals)
52 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); 52 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
53 shouldBe("getComputedStyle(host3, null).backgroundColor", "green"); 53 shouldBe("getComputedStyle(host3, null).backgroundColor", "green");
54 54
55 document.body.offsetLeft; // force style recalc. 55 document.body.offsetLeft; // force style recalc.
56 56
57 host4.className = "c4"; 57 host4.className = "c4";
58 if (window.internals) 58 if (window.internals)
59 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); 59 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
60 shouldBe("getComputedStyle(host4, null).backgroundColor", "green"); 60 shouldBe("getComputedStyle(host4, null).backgroundColor", "green");
61 61
62 </script> 62 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698