blob: f42c3fef2e22e6ef7807ab00ea5caab17a428a40 [file] [log] [blame]
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