27 lines
1.5 KiB
Plaintext
27 lines
1.5 KiB
Plaintext
This test passes if the nth-of-type can accept a parameter that is an+b, odd or even. But it does not accept any other parameter.
|
|
|
|
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
|
|
|
|
|
|
debug("These spans should alternate red and green");
|
|
span span span span span span span span
|
|
debug("These spans should alternate red and green");
|
|
span span span span span span span span
|
|
debug("These spans should be black");
|
|
span span span span span span span span
|
|
debug("These spans should be black");
|
|
span span span span span span span span
|
|
|
|
PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('color') is 'rgb(255, 0, 0)'
|
|
PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('color') is 'rgb(0, 128, 0)'
|
|
PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('color') is 'rgb(255, 0, 0)'
|
|
PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('color') is 'rgb(0, 128, 0)'
|
|
PASS document.querySelector("span.c3:nth-of-type(n3)") threw exception SyntaxError: The string did not match the expected pattern..
|
|
PASS document.querySelector("span.c3:nth-of-type(foo)") threw exception SyntaxError: The string did not match the expected pattern..
|
|
PASS document.querySelector("span.c3:nth-of-type(2n3)") threw exception SyntaxError: The string did not match the expected pattern..
|
|
PASS document.querySelector("span.c3:nth-of-type(foon + bar)") threw exception SyntaxError: The string did not match the expected pattern..
|
|
PASS successfullyParsed is true
|
|
|
|
TEST COMPLETE
|
|
|