blob: f0bd115e4f0b2a086ccc18547364f2134ab16725 [file] [log] [blame]
Check the basic features of the ":placeholder-shown" pseudo class with the <textarea> element.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS document.querySelectorAll(":placeholder-shown").length is 4
PASS document.querySelectorAll(":placeholder-shown")[0] is document.getElementById("valid-placeholder")
PASS document.querySelectorAll(":placeholder-shown")[1] is document.getElementById("valid-placeholder-with-value-attribute")
PASS document.querySelectorAll(":placeholder-shown")[2] is document.getElementById("valid-placeholder-with-value-attribute2")
PASS document.querySelectorAll(":placeholder-shown")[3] is document.getElementById("valid-placeholder-with-value-attribute3")
PASS getComputedStyle(document.getElementById("no-placeholder")).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById("empty-placeholder")).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById("empty-placeholder2")).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById("placeholder-contains-only-newline")).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById("placeholder-contains-only-carriageReturn")).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById("with-value")).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById("valid-placeholder")).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.getElementById("valid-placeholder-with-value-attribute")).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.getElementById("valid-placeholder-with-value-attribute2")).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.getElementById("valid-placeholder-with-value-attribute3")).backgroundColor is "rgb(1, 2, 3)"
PASS document.querySelectorAll("textarea:not(:placeholder-shown)").length is 6
PASS document.querySelectorAll("textarea:not(:placeholder-shown)")[0] is document.getElementById("no-placeholder")
PASS document.querySelectorAll("textarea:not(:placeholder-shown)")[1] is document.getElementById("empty-placeholder")
PASS document.querySelectorAll("textarea:not(:placeholder-shown)")[2] is document.getElementById("empty-placeholder2")
PASS document.querySelectorAll("textarea:not(:placeholder-shown)")[3] is document.getElementById("placeholder-contains-only-newline")
PASS document.querySelectorAll("textarea:not(:placeholder-shown)")[4] is document.getElementById("placeholder-contains-only-carriageReturn")
PASS document.querySelectorAll("textarea:not(:placeholder-shown)")[5] is document.getElementById("with-value")
PASS getComputedStyle(document.getElementById("no-placeholder")).color is "rgb(4, 5, 6)"
PASS getComputedStyle(document.getElementById("empty-placeholder")).color is "rgb(4, 5, 6)"
PASS getComputedStyle(document.getElementById("empty-placeholder2")).color is "rgb(4, 5, 6)"
PASS getComputedStyle(document.getElementById("placeholder-contains-only-newline")).color is "rgb(4, 5, 6)"
PASS getComputedStyle(document.getElementById("placeholder-contains-only-carriageReturn")).color is "rgb(4, 5, 6)"
PASS getComputedStyle(document.getElementById("with-value")).color is "rgb(4, 5, 6)"
PASS getComputedStyle(document.getElementById("valid-placeholder")).color is "rgb(0, 0, 0)"
PASS getComputedStyle(document.getElementById("valid-placeholder-with-value-attribute")).color is "rgb(0, 0, 0)"
PASS getComputedStyle(document.getElementById("valid-placeholder-with-value-attribute2")).color is "rgb(0, 0, 0)"
PASS getComputedStyle(document.getElementById("valid-placeholder-with-value-attribute3")).color is "rgb(0, 0, 0)"
PASS successfullyParsed is true
TEST COMPLETE