blob: 523781bdffba0e0bb6b83338b24fe4a180c03c2f [file] [log] [blame]
Selectors' sibling combinators ("+" or "~") create style update relation between elements. This test the case were such relation exists and is removed. This test relies on WebCore's internals.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Initially, the direct adjacent relation is satisfied and we have a match.
PASS getComputedStyle(document.querySelectorAll("foo, padding")[0]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[1]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[2]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[3]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[4]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[5]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[6]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[7]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.getElementById("bar-with-renderer")).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.getElementById("bar-without-renderer")).backgroundColor is "rgb(1, 2, 3)"
We remove <bar>, there is nothing matching the rightmost compound selector.
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case *")[0]) is false
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case *")[1]) is false
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case *")[2]) is false
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case *")[3]) is false
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case *")[4]) is false
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case *")[5]) is false
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case *")[6]) is false
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case *")[7]) is false
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case *")[8]) is false
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case *")[9]) is false
PASS document.getElementById("bar-with-renderer") is null
PASS document.getElementById("bar-without-renderer") is null
PASS getComputedStyle(document.querySelectorAll("foo, padding")[0]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[1]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[2]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[3]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[4]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[5]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[6]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[7]).backgroundColor is "rgb(255, 254, 253)"
Now we change a property of <foo>. Doing that can invalidate foo, but not the other elements.
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case :not(foo)")[0]) is false
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case :not(foo)")[1]) is false
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case :not(foo)")[2]) is false
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case :not(foo)")[3]) is false
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case :not(foo)")[4]) is false
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case :not(foo)")[5]) is false
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case :not(foo)")[6]) is false
PASS internals.nodeNeedsStyleRecalc(document.querySelectorAll(".test-case, .test-case :not(foo)")[7]) is false
PASS document.getElementById("bar-with-renderer") is null
PASS document.getElementById("bar-without-renderer") is null
PASS getComputedStyle(document.querySelectorAll("foo, padding")[0]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[1]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[2]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[3]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[4]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[5]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[6]).backgroundColor is "rgb(255, 254, 253)"
PASS getComputedStyle(document.querySelectorAll("foo, padding")[7]).backgroundColor is "rgb(255, 254, 253)"
PASS successfullyParsed is true
TEST COMPLETE