blob: ec7088b7e3b75e5e30fa66d5075584c92572ac5b [file] [log] [blame]
Verify selector specifying multiple :lang() pseudo class using comma-separated list arguments.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS document.querySelectorAll(":lang(en, en)").length is 3
PASS document.querySelectorAll(":lang(en-, en-)").length is 2
PASS document.querySelectorAll(":lang(en--, en--)").length is 1
PASS document.querySelectorAll(":lang(en---, en---)").length is 0
PASS document.querySelectorAll(":lang(de-DE, DE-de)").length is 8
PASS document.querySelectorAll(":lang(Latn, de-Latn)").length is 3
PASS document.querySelectorAll(":lang(Latf, de-Latf)").length is 2
PASS document.querySelectorAll(":lang(de-DE--, de-DE--)").length is 0
PASS getComputedStyle(document.querySelectorAll(":lang(de-DE, DE-de)")[0]).color is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll(":lang(de-DE, DE-de)")[1]).color is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll(":lang(de-DE, DE-de)")[2]).color is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll(":lang(de-DE, DE-de)")[3]).color is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll(":lang(de-DE, DE-de)")[4]).color is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll(":lang(de-DE, DE-de)")[5]).color is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll(":lang(de-DE, DE-de)")[6]).color is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll(":lang(de-DE, DE-de)")[7]).color is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelector(":lang(Latn, Latn-de)")).color is "rgb(0, 0, 0)"
PASS getComputedStyle(document.querySelector(":lang(Latf, Latf-de)")).color is "rgb(0, 0, 0)"
PASS getComputedStyle(document.querySelector(":lang(Latf, Latn)")).color is "rgb(0, 0, 0)"
PASS getComputedStyle(document.querySelector(":lang(Latf, Latn)")).color is "rgb(0, 0, 0)"
PASS document.querySelectorAll(":lang(ab)").length is 1
PASS document.querySelectorAll(":lang(cd)").length is 1
PASS document.querySelectorAll(":lang(ef)").length is 1
PASS document.querySelectorAll(":lang(ab, cd)").length is 2
PASS document.querySelectorAll(":lang(ab, cd, ef)").length is 3
PASS getComputedStyle(document.querySelectorAll(":lang(ab, cd)")[1]).color is "rgb(3, 2, 1)"
PASS getComputedStyle(document.querySelectorAll(":lang(ab, cd, ef)")[2]).color is "rgb(3, 2, 1)"
PASS document.querySelectorAll(":lang(-en, -en)").length is 0
PASS document.querySelectorAll(":lang(-en-, -en-)").length is 0
PASS document.querySelectorAll(":lang(-en, -en-)").length is 0
PASS document.querySelectorAll(":lang(-en-, -en--)").length is 0
PASS document.querySelectorAll(":lang(fr-x, fr-x)").length is 0
PASS document.querySelectorAll(":lang(fr-xenomorph, fr-xenomorph)").length is 1
PASS document.querySelectorAll(":lang(cocoa-1, cocoa-1)").length is 0
PASS document.querySelectorAll(":lang(cocoa-a, cocoa-a)").length is 0
PASS document.querySelectorAll(":lang(cocoa-bar, cocoa-bar)").length is 0
PASS document.querySelectorAll(":lang(foo, foo)").length is 1
PASS document.querySelectorAll(":lang(foo-bar, foo-bar)").length is 1
PASS document.querySelectorAll(":lang(foo--bar, foo--bar)").length is 1
PASS document.querySelectorAll(":lang(foo-, foo-)").length is 1
PASS document.querySelectorAll(":lang(foo--, foo--)").length is 0
PASS document.querySelectorAll(":lang(id, id)").length is 1
PASS document.querySelectorAll(":lang(id-, id-)").length is 1
PASS document.querySelectorAll(":lang(id--, id--)").length is 1
PASS document.querySelectorAll(":lang(id---Java, id---Java)").length is 1
PASS document.querySelectorAll(":lang(id--Java, id--Java)").length is 1
PASS document.querySelectorAll(":lang(id-Java, id-Java)").length is 1
PASS document.querySelectorAll(":lang(id---, id---)").length is 0
PASS document.querySelectorAll(":lang(tic-tac-toe, tic-tac)").length is 1
PASS document.querySelectorAll(":lang(tic-toe-tac, tic-toe-tac-tac)").length is 0
PASS document.querySelectorAll(":lang(--en--, --en--)").length threw exception SyntaxError: The string did not match the expected pattern..
PASS document.querySelectorAll(":lang(---en---, ---en---)").length threw exception SyntaxError: The string did not match the expected pattern..
PASS document.querySelectorAll(":lang(en us- de- fr-, en us- de- fr-).length") threw exception SyntaxError: The string did not match the expected pattern..
PASS successfullyParsed is true
TEST COMPLETE