blob: e2da39ef9017c01ef6d621d49e5dbe814ff1d885 [file] [edit]
Check the basic features of the ":not(selectorList)" pseudo class.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Testing ":not(testcaseA)"
PASS document.querySelectorAll('#test-root :not(testcaseA)').length is 5
PASS document.querySelectorAll('#test-root :not(testcaseA)')[0].id is "testcase2"
PASS document.querySelectorAll('#test-root :not(testcaseA)')[1].id is "testcase4"
PASS document.querySelectorAll('#test-root :not(testcaseA)')[2].id is "testcase6"
PASS document.querySelectorAll('#test-root :not(testcaseA)')[3].id is "testcase8"
PASS document.querySelectorAll('#test-root :not(testcaseA)')[4].id is "testcase10"
PASS styledElements is ["testcase2","testcase4","testcase6","testcase8","testcase10"]
Testing ":not(.bar)"
PASS document.querySelectorAll('#test-root :not(.bar)').length is 3
PASS document.querySelectorAll('#test-root :not(.bar)')[0].id is "testcase3"
PASS document.querySelectorAll('#test-root :not(.bar)')[1].id is "testcase5"
PASS document.querySelectorAll('#test-root :not(.bar)')[2].id is "testcase8"
PASS styledElements is ["testcase3","testcase5","testcase8"]
Testing ":not([attribute1])"
PASS document.querySelectorAll('#test-root :not([attribute1])').length is 3
PASS document.querySelectorAll('#test-root :not([attribute1])')[0].id is "testcase2"
PASS document.querySelectorAll('#test-root :not([attribute1])')[1].id is "testcase5"
PASS document.querySelectorAll('#test-root :not([attribute1])')[2].id is "testcase9"
PASS styledElements is ["testcase2","testcase5","testcase9"]
Testing ":not([attribute1=value1])"
PASS document.querySelectorAll('#test-root :not([attribute1=value1])').length is 3
PASS document.querySelectorAll('#test-root :not([attribute1=value1])')[0].id is "testcase2"
PASS document.querySelectorAll('#test-root :not([attribute1=value1])')[1].id is "testcase5"
PASS document.querySelectorAll('#test-root :not([attribute1=value1])')[2].id is "testcase9"
PASS styledElements is ["testcase2","testcase5","testcase9"]
Testing "[attribute1]:not([attribute1=value1])"
PASS document.querySelectorAll('#test-root [attribute1]:not([attribute1=value1])').length is 0
PASS styledElements is []
Testing ":not(#testcase3)"
PASS document.querySelectorAll('#test-root :not(#testcase3)').length is 9
PASS document.querySelectorAll('#test-root :not(#testcase3)')[0].id is "testcase1"
PASS document.querySelectorAll('#test-root :not(#testcase3)')[1].id is "testcase2"
PASS document.querySelectorAll('#test-root :not(#testcase3)')[2].id is "testcase4"
PASS document.querySelectorAll('#test-root :not(#testcase3)')[3].id is "testcase5"
PASS document.querySelectorAll('#test-root :not(#testcase3)')[4].id is "testcase6"
PASS document.querySelectorAll('#test-root :not(#testcase3)')[5].id is "testcase7"
PASS document.querySelectorAll('#test-root :not(#testcase3)')[6].id is "testcase8"
PASS document.querySelectorAll('#test-root :not(#testcase3)')[7].id is "testcase9"
PASS document.querySelectorAll('#test-root :not(#testcase3)')[8].id is "testcase10"
PASS styledElements is ["testcase1","testcase2","testcase4","testcase5","testcase6","testcase7","testcase8","testcase9","testcase10"]
Testing ":not(:empty)"
PASS document.querySelectorAll('#test-root :not(:empty)').length is 8
PASS document.querySelectorAll('#test-root :not(:empty)')[0].id is "testcase1"
PASS document.querySelectorAll('#test-root :not(:empty)')[1].id is "testcase3"
PASS document.querySelectorAll('#test-root :not(:empty)')[2].id is "testcase4"
PASS document.querySelectorAll('#test-root :not(:empty)')[3].id is "testcase5"
PASS document.querySelectorAll('#test-root :not(:empty)')[4].id is "testcase6"
PASS document.querySelectorAll('#test-root :not(:empty)')[5].id is "testcase7"
PASS document.querySelectorAll('#test-root :not(:empty)')[6].id is "testcase8"
PASS document.querySelectorAll('#test-root :not(:empty)')[7].id is "testcase10"
PASS styledElements is ["testcase1","testcase3","testcase4","testcase5","testcase6","testcase7","testcase8","testcase10"]
Testing ":not(testcaseB.bar)"
PASS document.querySelectorAll('#test-root :not(testcaseB.bar)').length is 6
PASS document.querySelectorAll('#test-root :not(testcaseB.bar)')[0].id is "testcase1"
PASS document.querySelectorAll('#test-root :not(testcaseB.bar)')[1].id is "testcase3"
PASS document.querySelectorAll('#test-root :not(testcaseB.bar)')[2].id is "testcase5"
PASS document.querySelectorAll('#test-root :not(testcaseB.bar)')[3].id is "testcase7"
PASS document.querySelectorAll('#test-root :not(testcaseB.bar)')[4].id is "testcase8"
PASS document.querySelectorAll('#test-root :not(testcaseB.bar)')[5].id is "testcase9"
PASS styledElements is ["testcase1","testcase3","testcase5","testcase7","testcase8","testcase9"]
Testing ":not(.baz.foo.bar)"
PASS document.querySelectorAll('#test-root :not(.baz.foo.bar)').length is 9
PASS document.querySelectorAll('#test-root :not(.baz.foo.bar)')[0].id is "testcase1"
PASS document.querySelectorAll('#test-root :not(.baz.foo.bar)')[1].id is "testcase2"
PASS document.querySelectorAll('#test-root :not(.baz.foo.bar)')[2].id is "testcase3"
PASS document.querySelectorAll('#test-root :not(.baz.foo.bar)')[3].id is "testcase4"
PASS document.querySelectorAll('#test-root :not(.baz.foo.bar)')[4].id is "testcase5"
PASS document.querySelectorAll('#test-root :not(.baz.foo.bar)')[5].id is "testcase7"
PASS document.querySelectorAll('#test-root :not(.baz.foo.bar)')[6].id is "testcase8"
PASS document.querySelectorAll('#test-root :not(.baz.foo.bar)')[7].id is "testcase9"
PASS document.querySelectorAll('#test-root :not(.baz.foo.bar)')[8].id is "testcase10"
PASS styledElements is ["testcase1","testcase2","testcase3","testcase4","testcase5","testcase7","testcase8","testcase9","testcase10"]
Testing ":not([id][class])"
PASS document.querySelectorAll('#test-root :not([id][class])').length is 0
PASS styledElements is []
Testing ":not(testcaseA[attribute1^=value])"
PASS document.querySelectorAll('#test-root :not(testcaseA[attribute1^=value])').length is 7
PASS document.querySelectorAll('#test-root :not(testcaseA[attribute1^=value])')[0].id is "testcase2"
PASS document.querySelectorAll('#test-root :not(testcaseA[attribute1^=value])')[1].id is "testcase4"
PASS document.querySelectorAll('#test-root :not(testcaseA[attribute1^=value])')[2].id is "testcase5"
PASS document.querySelectorAll('#test-root :not(testcaseA[attribute1^=value])')[3].id is "testcase6"
PASS document.querySelectorAll('#test-root :not(testcaseA[attribute1^=value])')[4].id is "testcase8"
PASS document.querySelectorAll('#test-root :not(testcaseA[attribute1^=value])')[5].id is "testcase9"
PASS document.querySelectorAll('#test-root :not(testcaseA[attribute1^=value])')[6].id is "testcase10"
PASS styledElements is ["testcase2","testcase4","testcase5","testcase6","testcase8","testcase9","testcase10"]
Testing ":not(.foo:empty)"
PASS document.querySelectorAll('#test-root :not(.foo:empty)').length is 9
PASS document.querySelectorAll('#test-root :not(.foo:empty)')[0].id is "testcase1"
PASS document.querySelectorAll('#test-root :not(.foo:empty)')[1].id is "testcase2"
PASS document.querySelectorAll('#test-root :not(.foo:empty)')[2].id is "testcase3"
PASS document.querySelectorAll('#test-root :not(.foo:empty)')[3].id is "testcase4"
PASS document.querySelectorAll('#test-root :not(.foo:empty)')[4].id is "testcase5"
PASS document.querySelectorAll('#test-root :not(.foo:empty)')[5].id is "testcase6"
PASS document.querySelectorAll('#test-root :not(.foo:empty)')[6].id is "testcase7"
PASS document.querySelectorAll('#test-root :not(.foo:empty)')[7].id is "testcase8"
PASS document.querySelectorAll('#test-root :not(.foo:empty)')[8].id is "testcase10"
PASS styledElements is ["testcase1","testcase2","testcase3","testcase4","testcase5","testcase6","testcase7","testcase8","testcase10"]
Testing ":not(html>body testcaseB.bar)"
PASS document.querySelectorAll('#test-root :not(html>body testcaseB.bar)').length is 6
PASS document.querySelectorAll('#test-root :not(html>body testcaseB.bar)')[0].id is "testcase1"
PASS document.querySelectorAll('#test-root :not(html>body testcaseB.bar)')[1].id is "testcase3"
PASS document.querySelectorAll('#test-root :not(html>body testcaseB.bar)')[2].id is "testcase5"
PASS document.querySelectorAll('#test-root :not(html>body testcaseB.bar)')[3].id is "testcase7"
PASS document.querySelectorAll('#test-root :not(html>body testcaseB.bar)')[4].id is "testcase8"
PASS document.querySelectorAll('#test-root :not(html>body testcaseB.bar)')[5].id is "testcase9"
PASS styledElements is ["testcase1","testcase3","testcase5","testcase7","testcase8","testcase9"]
Testing ":not(html body div .baz.foo.bar)"
PASS document.querySelectorAll('#test-root :not(html body div .baz.foo.bar)').length is 9
PASS document.querySelectorAll('#test-root :not(html body div .baz.foo.bar)')[0].id is "testcase1"
PASS document.querySelectorAll('#test-root :not(html body div .baz.foo.bar)')[1].id is "testcase2"
PASS document.querySelectorAll('#test-root :not(html body div .baz.foo.bar)')[2].id is "testcase3"
PASS document.querySelectorAll('#test-root :not(html body div .baz.foo.bar)')[3].id is "testcase4"
PASS document.querySelectorAll('#test-root :not(html body div .baz.foo.bar)')[4].id is "testcase5"
PASS document.querySelectorAll('#test-root :not(html body div .baz.foo.bar)')[5].id is "testcase7"
PASS document.querySelectorAll('#test-root :not(html body div .baz.foo.bar)')[6].id is "testcase8"
PASS document.querySelectorAll('#test-root :not(html body div .baz.foo.bar)')[7].id is "testcase9"
PASS document.querySelectorAll('#test-root :not(html body div .baz.foo.bar)')[8].id is "testcase10"
PASS styledElements is ["testcase1","testcase2","testcase3","testcase4","testcase5","testcase7","testcase8","testcase9","testcase10"]
Testing ":not(html body > div [id][class])"
PASS document.querySelectorAll('#test-root :not(html body > div [id][class])').length is 0
PASS styledElements is []
Testing ":not(:root div>testcaseA[attribute1^=value])"
PASS document.querySelectorAll('#test-root :not(:root div>testcaseA[attribute1^=value])').length is 7
PASS document.querySelectorAll('#test-root :not(:root div>testcaseA[attribute1^=value])')[0].id is "testcase2"
PASS document.querySelectorAll('#test-root :not(:root div>testcaseA[attribute1^=value])')[1].id is "testcase4"
PASS document.querySelectorAll('#test-root :not(:root div>testcaseA[attribute1^=value])')[2].id is "testcase5"
PASS document.querySelectorAll('#test-root :not(:root div>testcaseA[attribute1^=value])')[3].id is "testcase6"
PASS document.querySelectorAll('#test-root :not(:root div>testcaseA[attribute1^=value])')[4].id is "testcase8"
PASS document.querySelectorAll('#test-root :not(:root div>testcaseA[attribute1^=value])')[5].id is "testcase9"
PASS document.querySelectorAll('#test-root :not(:root div>testcaseA[attribute1^=value])')[6].id is "testcase10"
PASS styledElements is ["testcase2","testcase4","testcase5","testcase6","testcase8","testcase9","testcase10"]
Testing ":not(body>div .foo:empty)"
PASS document.querySelectorAll('#test-root :not(body>div .foo:empty)').length is 9
PASS document.querySelectorAll('#test-root :not(body>div .foo:empty)')[0].id is "testcase1"
PASS document.querySelectorAll('#test-root :not(body>div .foo:empty)')[1].id is "testcase2"
PASS document.querySelectorAll('#test-root :not(body>div .foo:empty)')[2].id is "testcase3"
PASS document.querySelectorAll('#test-root :not(body>div .foo:empty)')[3].id is "testcase4"
PASS document.querySelectorAll('#test-root :not(body>div .foo:empty)')[4].id is "testcase5"
PASS document.querySelectorAll('#test-root :not(body>div .foo:empty)')[5].id is "testcase6"
PASS document.querySelectorAll('#test-root :not(body>div .foo:empty)')[6].id is "testcase7"
PASS document.querySelectorAll('#test-root :not(body>div .foo:empty)')[7].id is "testcase8"
PASS document.querySelectorAll('#test-root :not(body>div .foo:empty)')[8].id is "testcase10"
PASS styledElements is ["testcase1","testcase2","testcase3","testcase4","testcase5","testcase6","testcase7","testcase8","testcase10"]
Testing ":not(testcaseB + *)"
PASS document.querySelectorAll('#test-root :not(testcaseB + *)').length is 6
PASS document.querySelectorAll('#test-root :not(testcaseB + *)')[0].id is "testcase1"
PASS document.querySelectorAll('#test-root :not(testcaseB + *)')[1].id is "testcase2"
PASS document.querySelectorAll('#test-root :not(testcaseB + *)')[2].id is "testcase4"
PASS document.querySelectorAll('#test-root :not(testcaseB + *)')[3].id is "testcase6"
PASS document.querySelectorAll('#test-root :not(testcaseB + *)')[4].id is "testcase8"
PASS document.querySelectorAll('#test-root :not(testcaseB + *)')[5].id is "testcase10"
PASS styledElements is ["testcase1","testcase2","testcase4","testcase6","testcase8","testcase10"]
Testing ":not(:root body>div testcaseB + *)"
PASS document.querySelectorAll('#test-root :not(:root body>div testcaseB + *)').length is 6
PASS document.querySelectorAll('#test-root :not(:root body>div testcaseB + *)')[0].id is "testcase1"
PASS document.querySelectorAll('#test-root :not(:root body>div testcaseB + *)')[1].id is "testcase2"
PASS document.querySelectorAll('#test-root :not(:root body>div testcaseB + *)')[2].id is "testcase4"
PASS document.querySelectorAll('#test-root :not(:root body>div testcaseB + *)')[3].id is "testcase6"
PASS document.querySelectorAll('#test-root :not(:root body>div testcaseB + *)')[4].id is "testcase8"
PASS document.querySelectorAll('#test-root :not(:root body>div testcaseB + *)')[5].id is "testcase10"
PASS styledElements is ["testcase1","testcase2","testcase4","testcase6","testcase8","testcase10"]
Testing ":not(testcaseA ~ *)"
PASS document.querySelectorAll('#test-root :not(testcaseA ~ *)').length is 1
PASS document.querySelectorAll('#test-root :not(testcaseA ~ *)')[0].id is "testcase1"
PASS styledElements is ["testcase1"]
Testing ":not(testcaseA + testcaseB ~ testcaseB)"
PASS document.querySelectorAll('#test-root :not(testcaseA + testcaseB ~ testcaseB)').length is 6
PASS document.querySelectorAll('#test-root :not(testcaseA + testcaseB ~ testcaseB)')[0].id is "testcase1"
PASS document.querySelectorAll('#test-root :not(testcaseA + testcaseB ~ testcaseB)')[1].id is "testcase2"
PASS document.querySelectorAll('#test-root :not(testcaseA + testcaseB ~ testcaseB)')[2].id is "testcase3"
PASS document.querySelectorAll('#test-root :not(testcaseA + testcaseB ~ testcaseB)')[3].id is "testcase5"
PASS document.querySelectorAll('#test-root :not(testcaseA + testcaseB ~ testcaseB)')[4].id is "testcase7"
PASS document.querySelectorAll('#test-root :not(testcaseA + testcaseB ~ testcaseB)')[5].id is "testcase9"
PASS styledElements is ["testcase1","testcase2","testcase3","testcase5","testcase7","testcase9"]
PASS successfullyParsed is true
TEST COMPLETE