blob: ac685d3fde963d7c34472568288d638e720f5367 [file] [log] [blame]
Test the :active selector when the document is in strict mode. To test manually, move the cursor over the green rectangle and press a mouse button until the test is finished.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS document.querySelectorAll("div:active").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("#target:active").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":active#target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("#target:active#target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(".aClass:active").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":active.aClass").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(".aClass:active.otherClass").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(".aClass[webkit]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":active[webkit]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("[id]:active[webkit]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(".aClass[webkit=rocks]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":active[webkit=rocks]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("[id=target]:active[webkit=rocks]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(".aClass[webkit^=ro]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":active[webkit^=ro]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("[id^=ta]:active[webkit^=ro]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(".aClass[webkit$=ks]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":active[webkit$=ks]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("[id$=et]:active[webkit$=ks]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(".aClass[webkit*=ck]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":active[webkit*=ck]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("[id*=rg]:active[webkit*=ck]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(".aClass[webkit~=rocks]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":active[webkit~=rocks]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("[id~=target]:active[webkit~=rocks]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(".aClass[webkit|=rocks]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":active[webkit|=rocks]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("[id|=target]:active[webkit|=rocks]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":nth-child(1):active").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":active:nth-child(1)").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":nth-child(1):active:nth-child(1)").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":nth-child(n):active > #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":active:nth-child(n) > #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":nth-child(n):active:nth-child(n) > #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":nth-child(n):active #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":active:nth-child(n) #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":nth-child(n):active:nth-child(n) #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":-webkit-any(:active) #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":active").length is 3
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("*:active").length is 3
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS successfullyParsed is true
TEST COMPLETE