Index: LayoutTests/fast/css/invalidation/sibling-inserted.html |
diff --git a/LayoutTests/fast/css/invalidation/webkit-any-universal.html b/LayoutTests/fast/css/invalidation/sibling-inserted.html |
similarity index 55% |
copy from LayoutTests/fast/css/invalidation/webkit-any-universal.html |
copy to LayoutTests/fast/css/invalidation/sibling-inserted.html |
index 51150a10c2f161d7e918810ac32d18a476c88aaa..0fe9eba928346da4ae9f9abcf09544f8bed9aab0 100644 |
--- a/LayoutTests/fast/css/invalidation/webkit-any-universal.html |
+++ b/LayoutTests/fast/css/invalidation/sibling-inserted.html |
@@ -2,50 +2,67 @@ |
<script src="../../../resources/testharness.js"></script> |
<script src="../../../resources/testharnessreport.js"></script> |
<style> |
-.t1 :-webkit-any(*, .dummy), |
-.t2 :-webkit-any(:-webkit-any(.dummy, *), .dummy), |
-.t3 :-webkit-any(:focus, dummy) { background-color: rgb(0, 128, 0); } |
- |
-#r3 { width: 10px; height: 10px } |
+#t1 + div + div + #r1, |
+#t2 + div + div + #r2, |
+#t3 + div + div + #r3 { background-color: rgb(0, 128, 0); } |
</style> |
-<div id="t1"> |
+<div> |
+ <div id="t1"></div> |
+ <div id="i1"></div> |
<div id="r1"></div> |
+ <div></div> |
</div> |
-<div id="t2"> |
+<div> |
+ <div id="i2"></div> |
+ <div></div> |
<div id="r2"></div> |
+ <div></div> |
</div> |
-<div id="t3"> |
- <div id="r3" tabIndex="1"></div> |
+<div> |
+ <div id="t3"></div> |
+ <div></div> |
+ <div id="d3"></div> |
+ <div></div> |
+ <div id="r3"></div> |
+ <div></div> |
</div> |
<script> |
+'use strict'; |
document.body.offsetTop; |
test(function() { |
+ var i1 = document.getElementById('i1'); |
+ var r1 = document.getElementById('r1'); |
assert_true(!!window.internals, "This test only works with internals exposed present"); |
assert_equals(getComputedStyle(r1).backgroundColor, "rgba(0, 0, 0, 0)", "Background color should initially be transparent"); |
- t1.className = "t1"; |
- assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2, "Subtree style recalc"); |
+ i1.parentNode.insertBefore(document.createElement('div'), i1); |
+ assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 4, "Subtree style recalc"); |
assert_equals(getComputedStyle(r1).backgroundColor, "rgb(0, 128, 0)", "Background color is green after class change"); |
-}, ":-webkit-any() with universal selector"); |
+}, "Insert between siblings"); |
test(function() { |
+ var i2 = document.getElementById('i2'); |
+ var r2 = document.getElementById('r2'); |
assert_true(!!window.internals, "This test only works with internals exposed present"); |
assert_equals(getComputedStyle(r2).backgroundColor, "rgba(0, 0, 0, 0)", "Background color should initially be transparent"); |
- t2.className = "t2"; |
- assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2, "Subtree style recalc"); |
+ var t2 = document.createElement('div'); |
+ t2.id = 't2'; |
+ i2.parentNode.insertBefore(t2, i2); |
+ assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 5, "Subtree style recalc"); |
assert_equals(getComputedStyle(r2).backgroundColor, "rgb(0, 128, 0)", "Background color is green after class change"); |
-}, "Nested :-webkit-any() with universal selector"); |
+}, "Insert before siblings"); |
test(function() { |
+ var d3 = document.getElementById('d3'); |
+ var r3 = document.getElementById('r3'); |
assert_true(!!window.internals, "This test only works with internals exposed present"); |
+ assert_true(!!window.eventSender, "This test only works with eventSender present"); |
- r3.focus(); |
- assert_equals(getComputedStyle(r3).backgroundColor, "rgba(0, 0, 0, 0)", "Background color should initially be transparent"); |
- |
- t3.className = "t3"; |
- assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2, "Subtree style recalc"); |
+ d3.parentNode.removeChild(d3); |
+ assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 3, "Subtree style recalc"); |
assert_equals(getComputedStyle(r3).backgroundColor, "rgb(0, 128, 0)", "Background color is green after class change"); |
-}, ":-webkit-any() with universal :focus selector"); |
+}, "Remove between siblings"); |
+ |
</script> |