blob: d3dd4c29ecba0f2ac81d1e26083f2f421d566495 [file] [log] [blame]
Test the basic cases of style update when matching attribute values with the case-insensitive flag.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Initial state.
PASS document.querySelectorAll("[data-webkit=Matched i]").length is 0
PASS getComputedStyle(document.querySelectorAll("target")[0]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("target")[1]).backgroundColor is "rgb(255, 255, 255)"
Adding the attribute without value.
PASS document.querySelectorAll("[data-webkit=Matched i]").length is 0
PASS getComputedStyle(document.querySelectorAll("target")[0]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("target")[1]).backgroundColor is "rgb(255, 255, 255)"
Setting the value to "matched".
PASS document.querySelectorAll("[data-webkit=Matched i]").length is 2
PASS getComputedStyle(document.querySelectorAll("target")[0]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("target")[1]).backgroundColor is "rgb(1, 2, 3)"
Setting the value to "not".
PASS document.querySelectorAll("[data-webkit=Matched i]").length is 0
PASS getComputedStyle(document.querySelectorAll("target")[0]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("target")[1]).backgroundColor is "rgb(255, 255, 255)"
Setting the value to "Matched".
PASS document.querySelectorAll("[data-webkit=Matched i]").length is 2
PASS getComputedStyle(document.querySelectorAll("target")[0]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("target")[1]).backgroundColor is "rgb(1, 2, 3)"
Setting the value of an unrelated attribute to "Matched".
PASS document.querySelectorAll("[data-webkit=Matched i]").length is 2
PASS getComputedStyle(document.querySelectorAll("target")[0]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("target")[1]).backgroundColor is "rgb(1, 2, 3)"
Remove the data-webkit attribute.
PASS document.querySelectorAll("[data-webkit=Matched i]").length is 0
PASS getComputedStyle(document.querySelectorAll("target")[0]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("target")[1]).backgroundColor is "rgb(255, 255, 255)"
Setting the value to "MATCHED".
PASS document.querySelectorAll("[data-webkit=Matched i]").length is 2
PASS getComputedStyle(document.querySelectorAll("target")[0]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("target")[1]).backgroundColor is "rgb(1, 2, 3)"
PASS successfullyParsed is true
TEST COMPLETE