blob: 82577526b52597e31a6ce5ba78ea0d61293298a3 [file] [log] [blame]
Test the basic features of ":read-only", ":read-write" on the <textarea> element. The definition is that ":read-write" is matches for "textarea elements that do not have a readonly attribute, and that are not disabled". In a fieldset, all elements that are not part of the legend are disabled if the fieldset is disabled.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS document.querySelectorAll("textarea:read-write").length is 4
PASS document.querySelectorAll("textarea:read-write")[0].id is "textarea1"
PASS document.querySelectorAll("textarea:read-write")[1].id is "textarea2"
PASS document.querySelectorAll("textarea:read-write")[2].id is "textarea3"
PASS document.querySelectorAll("textarea:read-write")[3].id is "textarea5"
PASS document.querySelectorAll("textarea:read-only").length is 2
PASS document.querySelectorAll("textarea:read-only")[0].id is "textarea4"
PASS document.querySelectorAll("textarea:read-only")[1].id is "textarea6"
PASS getComputedStyle(document.getElementById('textarea1')).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById('textarea1')).color is "rgb(4, 5, 6)"
PASS getComputedStyle(document.getElementById('textarea2')).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById('textarea2')).color is "rgb(4, 5, 6)"
PASS getComputedStyle(document.getElementById('textarea3')).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById('textarea3')).color is "rgb(4, 5, 6)"
PASS getComputedStyle(document.getElementById('textarea4')).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.getElementById('textarea4')).color is "rgb(0, 0, 0)"
PASS getComputedStyle(document.getElementById('textarea5')).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.getElementById('textarea5')).color is "rgb(4, 5, 6)"
PASS getComputedStyle(document.getElementById('textarea6')).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.getElementById('textarea6')).color is "rgb(0, 0, 0)"
PASS successfullyParsed is true
TEST COMPLETE