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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/unresolved-pseudo.html

Issue 1896793002: Rename (updateLayout/updateStyle).*.() to updateStyleAndLayout.*.() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 #sibling, #child { background-color: green } 4 #sibling, #child { background-color: green }
5 custom-one:unresolved #child, custom-two:unresolved + #sibling { background-colo r: red } 5 custom-one:unresolved #child, custom-two:unresolved + #sibling { background-colo r: red }
6 </style> 6 </style>
7 7
8 <custom-one> 8 <custom-one>
9 <div></div> 9 <div></div>
10 <div id="child"></div> 10 <div id="child"></div>
(...skipping 14 matching lines...) Expand all
25 // Initially :unresolved. 25 // Initially :unresolved.
26 shouldBe("getComputedStyle(child).backgroundColor", "red"); 26 shouldBe("getComputedStyle(child).backgroundColor", "red");
27 shouldBe("getComputedStyle(sibling).backgroundColor", "red"); 27 shouldBe("getComputedStyle(sibling).backgroundColor", "red");
28 28
29 document.body.offsetTop; // force recalc 29 document.body.offsetTop; // force recalc
30 30
31 var CustomOne = document.registerElement("custom-one", { prototype: Object.creat e(HTMLElement.prototype) }); 31 var CustomOne = document.registerElement("custom-one", { prototype: Object.creat e(HTMLElement.prototype) });
32 document.head.appendChild(new CustomOne()); 32 document.head.appendChild(new CustomOne());
33 33
34 if (window.internals) 34 if (window.internals)
35 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); 35 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "1 ");
36 shouldBe("getComputedStyle(child).backgroundColor", "green"); 36 shouldBe("getComputedStyle(child).backgroundColor", "green");
37 37
38 document.body.offsetTop; // force recalc 38 document.body.offsetTop; // force recalc
39 39
40 var CustomTwo = document.registerElement("custom-two", { prototype: Object.creat e(HTMLElement.prototype) }); 40 var CustomTwo = document.registerElement("custom-two", { prototype: Object.creat e(HTMLElement.prototype) });
41 document.head.appendChild(new CustomTwo()); 41 document.head.appendChild(new CustomTwo());
42 42
43 if (window.internals) 43 if (window.internals)
44 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); 44 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "1 ");
45 shouldBe("getComputedStyle(sibling).backgroundColor", "green"); 45 shouldBe("getComputedStyle(sibling).backgroundColor", "green");
46 46
47 </script> 47 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698