blob: 5b20e282ef69918fe421e7b265026e934315e658 [file] [log] [blame]
Verify selector specifying extended filtering of :lang() pseudo class
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS document.querySelectorAll(":lang(en)").length is 3
PASS document.querySelectorAll(":lang(en-)").length is 2
PASS document.querySelectorAll(":lang(en--)").length is 1
PASS document.querySelectorAll(":lang(en---)").length is 0
PASS document.querySelectorAll(":lang(de-de)").length is 8
PASS document.querySelectorAll(":lang(de-DE)").length is 8
PASS document.querySelectorAll(":lang(DE-de)").length is 8
PASS document.querySelectorAll(":lang(dE-dE)").length is 8
PASS document.querySelectorAll(":lang(De-De)").length is 8
PASS document.querySelectorAll(":lang(DE-DE)").length is 8
PASS document.querySelectorAll(":lang(Latn)").length is 1
PASS document.querySelectorAll(":lang(Latf)").length is 1
PASS document.querySelectorAll(":lang(Latn-de)").length is 1
PASS document.querySelectorAll(":lang(Latf-de)").length is 1
PASS document.querySelectorAll(":lang(Latn, de-Latn)").length is 3
PASS document.querySelectorAll(":lang(Latf, de-Latf)").length is 2
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(-en)").length is 0
PASS document.querySelectorAll(":lang(-en-)").length is 0
PASS document.querySelectorAll(":lang(-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)").length is 0
PASS document.querySelectorAll(":lang(fr-xenomorph)").length is 1
PASS document.querySelectorAll(":lang(cocoa-1)").length is 0
PASS document.querySelectorAll(":lang(cocoa-a)").length is 0
PASS document.querySelectorAll(":lang(cocoa-bar)").length is 0
PASS document.querySelectorAll(":lang(cocoa-1, cocoa-bar)").length is 0
PASS document.querySelectorAll(":lang(cocoa-a, cocoa-bar)").length is 0
PASS document.querySelectorAll(":lang(cocoa-1, cocoa-a)").length is 0
PASS document.querySelectorAll(":lang(foo)").length is 1
PASS document.querySelectorAll(":lang(foo-bar)").length is 1
PASS document.querySelectorAll(":lang(foo--bar)").length is 1
PASS document.querySelectorAll(":lang(foo-)").length is 1
PASS document.querySelectorAll(":lang(foo--)").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-, foo--)").length is 1
PASS document.querySelectorAll(":lang(foo--, foo---)").length is 0
PASS document.querySelectorAll(":lang(id)").length is 1
PASS document.querySelectorAll(":lang(id-)").length is 1
PASS document.querySelectorAll(":lang(id--)").length is 1
PASS document.querySelectorAll(":lang(id---Java)").length is 1
PASS document.querySelectorAll(":lang(id--Java)").length is 1
PASS document.querySelectorAll(":lang(id-Java)").length is 1
PASS document.querySelectorAll(":lang(id---)").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--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)").length is 1
PASS document.querySelectorAll(":lang(tic-toe-tac)").length is 0
PASS document.querySelectorAll(":lang(\\*)").length is 35
PASS document.querySelectorAll(':lang("*-CH")').length is 5
PASS document.querySelectorAll(":lang(a)").length is 2
PASS document.querySelectorAll(":lang(a-\\*)").length is 1
PASS document.querySelectorAll(':lang("*-fr-\\*")').length is 2
PASS document.querySelectorAll(':lang("*-\\*-lang")').length is 2
PASS document.querySelectorAll(':lang("*-\\*-aa-bb-cc-dd")').length is 3
PASS document.querySelectorAll(':lang("*-\\*-\\*-bb-cc-dd")').length is 3
PASS document.querySelectorAll(':lang("*-\\*-\\*-\\*-cc-dd")').length is 3
PASS document.querySelectorAll(':lang("*-\\*-\\*-\\*-\\*-dd")').length is 3
PASS document.querySelectorAll(':lang("*-\\*-\\*-\\*-\\*-\\*")').length is 3
PASS document.querySelectorAll(':lang("*-\\*-aa-\\*-cc-\\*")').length is 3
PASS document.querySelectorAll(':lang("*-\\*-\\*-bb-\\*")').length is 3
PASS document.querySelectorAll(":lang(fooÉ)").length is 1
PASS document.querySelectorAll(":lang(fOOÉ)").length is 1
PASS document.querySelectorAll(":lang(FoOÉ)").length is 1
PASS document.querySelectorAll(":lang(FOOÉ)").length is 1
PASS document.querySelectorAll(":lang(fooé)").length is 0
PASS document.querySelectorAll(":lang(FOOé)").length is 0
PASS document.querySelectorAll(":lang(foöÉ-bÁr)").length is 1
PASS document.querySelectorAll(":lang(FoöÉ-bÁr)").length is 1
PASS document.querySelectorAll(":lang(FOöÉ-bÁr)").length is 1
PASS document.querySelectorAll(":lang(FOòÉ-bÁr)").length is 0
PASS document.querySelectorAll(":lang(FOòę-bÁr)").length is 0
PASS document.querySelectorAll(":lang(foöÉ-\\*)").length is 1
PASS document.querySelectorAll(":lang(\\*-bÁr)").length is 1
PASS document.querySelectorAll(":lang(\\*-BÁr)").length is 1
PASS document.querySelectorAll(":lang(\\*-BÁR)").length is 1
PASS document.querySelectorAll(":lang(\\*-Bár)").length is 0
PASS document.querySelectorAll(":lang(\\*-báR)").length is 0
PASS document.querySelectorAll(":lang(\\*-BáR)").length is 0
PASS document.querySelectorAll(":lang(FOöÉ-BÁr)").length is 1
PASS document.querySelectorAll(":lang(FOöÉ-BÁ)").length is 0
PASS document.querySelectorAll(":lang(FOöÉ-B)").length is 0
PASS document.querySelectorAll(":lang(f-BÁr)").length is 0
PASS document.querySelectorAll(":lang(fO-BÁr)").length is 0
PASS document.querySelectorAll(":lang(fOö-BÁr)").length is 0
PASS document.querySelectorAll(":lang(FOöÉ-BÁr1)").length is 0
PASS document.querySelectorAll(":lang(FOöÉ-BÁr12)").length is 0
PASS document.querySelectorAll(":lang(FOöÉ-BÁr123)").length is 0
PASS document.querySelectorAll(":lang(F-Xe)").length is 0
PASS document.querySelectorAll(":lang(Fr-Xe)").length is 0
PASS document.querySelectorAll(":lang(fr-Xe)").length is 0
PASS document.querySelectorAll(":lang(fr-Xen)").length is 0
PASS document.querySelectorAll(":lang(fr-Xeno)").length is 0
PASS document.querySelectorAll(":lang(fr-Xenom)").length is 0
PASS document.querySelectorAll(":lang(fr-Xenomo)").length is 0
PASS document.querySelectorAll(":lang(fr-Xenomor)").length is 0
PASS document.querySelectorAll(":lang(fr-Xenomorp)").length is 0
PASS document.querySelectorAll(":lang(fr-Xènömòrph)").length is 0
PASS document.querySelectorAll(":lang(FR-XENOMORPH)").length is 1
PASS document.querySelectorAll(":lang(foöÉbÁr)").length is 1
PASS document.querySelectorAll(":lang(foöÉbÁ)").length is 0
PASS document.querySelectorAll(":lang(foöÉb)").length is 0
PASS document.querySelectorAll(":lang(foöÉ)").length is 1
PASS document.querySelectorAll(":lang(foö)").length is 0
PASS document.querySelectorAll(":lang(fo)").length is 0
PASS document.querySelectorAll(":lang(f)").length is 0
PASS document.querySelectorAll(":lang(*)").length threw exception SyntaxError: The string did not match the expected pattern..
PASS document.querySelectorAll(":lang(*foöÉ)").length threw exception SyntaxError: The string did not match the expected pattern..
PASS document.querySelectorAll(":lang(--en--)").length threw exception SyntaxError: The string did not match the expected pattern..
PASS document.querySelectorAll(":lang(---en---)").length threw exception SyntaxError: The string did not match the expected pattern..
PASS document.querySelectorAll(":lang(en us- de- fr-).length") threw exception SyntaxError: The string did not match the expected pattern..
PASS document.querySelectorAll(":lang(-\\* \\*-)").length threw exception SyntaxError: The string did not match the expected pattern..
PASS successfullyParsed is true
TEST COMPLETE