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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/empty-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 :empty { background-color: green } 4 :empty { background-color: green }
5 #empty + div, #not-empty + div { color: pink } 5 #empty + div, #not-empty + div { color: pink }
6 </style> 6 </style>
7 <div id="empty"></div> 7 <div id="empty"></div>
8 <div> 8 <div>
9 <div></div> 9 <div></div>
10 <div></div> 10 <div></div>
(...skipping 12 matching lines...) Expand all
23 23
24 var transparent = "rgba(0, 0, 0, 0)"; 24 var transparent = "rgba(0, 0, 0, 0)";
25 var green = "rgb(0, 128, 0)"; 25 var green = "rgb(0, 128, 0)";
26 26
27 shouldBe("getComputedStyle(empty, '').backgroundColor", "green"); 27 shouldBe("getComputedStyle(empty, '').backgroundColor", "green");
28 28
29 empty.offsetTop; // force recalc 29 empty.offsetTop; // force recalc
30 empty.appendChild(document.createElement("div")); 30 empty.appendChild(document.createElement("div"));
31 31
32 if (window.internals) 32 if (window.internals)
33 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); 33 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "2 ");
34 34
35 shouldBe("getComputedStyle(empty, '').backgroundColor", "transparent"); 35 shouldBe("getComputedStyle(empty, '').backgroundColor", "transparent");
36 36
37 shouldBe("getComputedStyle(notEmpty, '').backgroundColor", "transparent"); 37 shouldBe("getComputedStyle(notEmpty, '').backgroundColor", "transparent");
38 38
39 notEmpty.offsetTop; // force recalc 39 notEmpty.offsetTop; // force recalc
40 notEmpty.removeChild(child); 40 notEmpty.removeChild(child);
41 41
42 if (window.internals) 42 if (window.internals)
43 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); 43 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "1 ");
44 44
45 shouldBe("getComputedStyle(notEmpty, '').backgroundColor", "green"); 45 shouldBe("getComputedStyle(notEmpty, '').backgroundColor", "green");
46 </script> 46 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698