blob: 6c8ba06978bca33e06aa80b8cc7d904c0766e7bc [file] [log] [blame]
Test :is() with a selector list ending with selector that can never match.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Testing "testcase:is(.bar, :not(*))"
PASS document.querySelectorAll('#test-root testcase:is(.bar, :not(*))').length is 1
PASS document.querySelectorAll('#test-root testcase:is(.bar, :not(*))')[0].id is "testcase1"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
Testing "testcase:is(.bazoo, *:not(*))"
PASS document.querySelectorAll('#test-root testcase:is(.bazoo, *:not(*))').length is 1
PASS document.querySelectorAll('#test-root testcase:is(.bazoo, *:not(*))')[0].id is "testcase2"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
Testing "testcase:is(.baz, #foo#bar)"
PASS document.querySelectorAll('#test-root testcase:is(.baz, #foo#bar)').length is 1
PASS document.querySelectorAll('#test-root testcase:is(.baz, #foo#bar)')[0].id is "testcase3"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
Testing "testcase:is(.bar, #foo#bar, :not(*), *:not(*), foo:not(*))"
PASS document.querySelectorAll('#test-root testcase:is(.bar, #foo#bar, :not(*), *:not(*), foo:not(*))').length is 1
PASS document.querySelectorAll('#test-root testcase:is(.bar, #foo#bar, :not(*), *:not(*), foo:not(*))')[0].id is "testcase1"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
Testing "testcase:is(.bazoo, #foo#bar, :not(*), *:not(*), foo:not(*), #foo#bar, :not(*), *:not(*), foo:not(*))"
PASS document.querySelectorAll('#test-root testcase:is(.bazoo, #foo#bar, :not(*), *:not(*), foo:not(*), #foo#bar, :not(*), *:not(*), foo:not(*))').length is 1
PASS document.querySelectorAll('#test-root testcase:is(.bazoo, #foo#bar, :not(*), *:not(*), foo:not(*), #foo#bar, :not(*), *:not(*), foo:not(*))')[0].id is "testcase2"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
PASS successfullyParsed is true
TEST COMPLETE