haikuwebkit/LayoutTests/fast/css/style-sharing-empty-rule-mo...

35 lines
2.3 KiB
Plaintext

Test that changing an empty rule with CSSOM updates the elements correctly.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Before changing the rules
PASS window.getComputedStyle(document.getElementById("target1")).backgroundColor is "rgb(1, 2, 3)"
PASS window.getComputedStyle(document.getElementById("target2")).backgroundColor is "rgb(1, 2, 3)"
PASS window.getComputedStyle(document.getElementById("target3")).backgroundColor is "rgb(1, 2, 3)"
PASS window.getComputedStyle(document.getElementById("target4")).backgroundColor is "rgb(1, 2, 3)"
Changing the first-child rule
PASS window.getComputedStyle(document.getElementById("target1")).backgroundColor is "rgb(4, 5, 6)"
PASS window.getComputedStyle(document.getElementById("target2")).backgroundColor is "rgb(1, 2, 3)"
PASS window.getComputedStyle(document.getElementById("target3")).backgroundColor is "rgb(1, 2, 3)"
PASS window.getComputedStyle(document.getElementById("target4")).backgroundColor is "rgb(1, 2, 3)"
Changing the last-child rule
PASS window.getComputedStyle(document.getElementById("target1")).backgroundColor is "rgb(4, 5, 6)"
PASS window.getComputedStyle(document.getElementById("target2")).backgroundColor is "rgb(1, 2, 3)"
PASS window.getComputedStyle(document.getElementById("target3")).backgroundColor is "rgb(1, 2, 3)"
PASS window.getComputedStyle(document.getElementById("target4")).backgroundColor is "rgb(7, 8, 9)"
Emptying the first-child rule
PASS window.getComputedStyle(document.getElementById("target1")).backgroundColor is "rgb(1, 2, 3)"
PASS window.getComputedStyle(document.getElementById("target2")).backgroundColor is "rgb(1, 2, 3)"
PASS window.getComputedStyle(document.getElementById("target3")).backgroundColor is "rgb(1, 2, 3)"
PASS window.getComputedStyle(document.getElementById("target4")).backgroundColor is "rgb(7, 8, 9)"
Emptying the last-child rule
PASS window.getComputedStyle(document.getElementById("target1")).backgroundColor is "rgb(1, 2, 3)"
PASS window.getComputedStyle(document.getElementById("target2")).backgroundColor is "rgb(1, 2, 3)"
PASS window.getComputedStyle(document.getElementById("target3")).backgroundColor is "rgb(1, 2, 3)"
PASS window.getComputedStyle(document.getElementById("target4")).backgroundColor is "rgb(1, 2, 3)"
PASS successfullyParsed is true
TEST COMPLETE