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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/webkit-any-universal.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/testharness.js"></script> 2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script> 3 <script src="../../../resources/testharnessreport.js"></script>
4 <style> 4 <style>
5 .t1 :-webkit-any(*, .dummy), 5 .t1 :-webkit-any(*, .dummy),
6 .t2 :-webkit-any(:-webkit-any(.dummy, *), .dummy), 6 .t2 :-webkit-any(:-webkit-any(.dummy, *), .dummy),
7 .t3 :-webkit-any(:focus, dummy) { background-color: rgb(0, 128, 0); } 7 .t3 :-webkit-any(:focus, dummy) { background-color: rgb(0, 128, 0); }
8 8
9 #r3 { width: 10px; height: 10px } 9 #r3 { width: 10px; height: 10px }
10 </style> 10 </style>
(...skipping 10 matching lines...) Expand all
21 document.body.offsetTop; 21 document.body.offsetTop;
22 22
23 test(function() { 23 test(function() {
24 assert_true(!!window.internals, "This test only works with internals exposed present"); 24 assert_true(!!window.internals, "This test only works with internals exposed present");
25 }, "internals are exposed"); 25 }, "internals are exposed");
26 26
27 test(function() { 27 test(function() {
28 assert_equals(getComputedStyle(r1).backgroundColor, "rgba(0, 0, 0, 0)", "Bac kground color should initially be transparent"); 28 assert_equals(getComputedStyle(r1).backgroundColor, "rgba(0, 0, 0, 0)", "Bac kground color should initially be transparent");
29 29
30 t1.className = "t1"; 30 t1.className = "t1";
31 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2, "Subt ree style recalc"); 31 assert_equals(internals.updateStyleAndLayoutAndReturnAffectedElementCount(), 2, "Subtree style recalc");
32 assert_equals(getComputedStyle(r1).backgroundColor, "rgb(0, 128, 0)", "Backg round color is green after class change"); 32 assert_equals(getComputedStyle(r1).backgroundColor, "rgb(0, 128, 0)", "Backg round color is green after class change");
33 }, ":-webkit-any() with universal selector"); 33 }, ":-webkit-any() with universal selector");
34 34
35 test(function() { 35 test(function() {
36 assert_equals(getComputedStyle(r2).backgroundColor, "rgba(0, 0, 0, 0)", "Bac kground color should initially be transparent"); 36 assert_equals(getComputedStyle(r2).backgroundColor, "rgba(0, 0, 0, 0)", "Bac kground color should initially be transparent");
37 37
38 t2.className = "t2"; 38 t2.className = "t2";
39 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2, "Subt ree style recalc"); 39 assert_equals(internals.updateStyleAndLayoutAndReturnAffectedElementCount(), 2, "Subtree style recalc");
40 assert_equals(getComputedStyle(r2).backgroundColor, "rgb(0, 128, 0)", "Backg round color is green after class change"); 40 assert_equals(getComputedStyle(r2).backgroundColor, "rgb(0, 128, 0)", "Backg round color is green after class change");
41 }, "Nested :-webkit-any() with universal selector"); 41 }, "Nested :-webkit-any() with universal selector");
42 42
43 test(function() { 43 test(function() {
44 r3.focus(); 44 r3.focus();
45 assert_equals(getComputedStyle(r3).backgroundColor, "rgba(0, 0, 0, 0)", "Bac kground color should initially be transparent"); 45 assert_equals(getComputedStyle(r3).backgroundColor, "rgba(0, 0, 0, 0)", "Bac kground color should initially be transparent");
46 46
47 t3.className = "t3"; 47 t3.className = "t3";
48 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2, "Subt ree style recalc"); 48 assert_equals(internals.updateStyleAndLayoutAndReturnAffectedElementCount(), 2, "Subtree style recalc");
49 assert_equals(getComputedStyle(r3).backgroundColor, "rgb(0, 128, 0)", "Backg round color is green after class change"); 49 assert_equals(getComputedStyle(r3).backgroundColor, "rgb(0, 128, 0)", "Backg round color is green after class change");
50 }, ":-webkit-any() with universal :focus selector"); 50 }, ":-webkit-any() with universal :focus selector");
51 </script> 51 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698