blob: bb9cb3ac36092d5c36c9694b06396b3cc16bbaf2 [file] [log] [blame]
Test the :hover selector when the document is in quirks mode. To test manually, move the cursor over the green rectangle and reload the page.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS document.querySelectorAll(":hover").length is 0
PASS getComputedStyle(document.getElementById("target")).color is "rgb(1, 2, 3)"
PASS document.querySelectorAll("*:hover").length is 0
PASS getComputedStyle(document.getElementById("target")).color is "rgb(1, 2, 3)"
PASS document.querySelectorAll(":hover:hover").length is 0
PASS getComputedStyle(document.getElementById("target")).color is "rgb(1, 2, 3)"
PASS document.querySelectorAll(":hover:hover").length is 0
PASS getComputedStyle(document.getElementById("target")).color is "rgb(1, 2, 3)"
PASS document.querySelectorAll(":hover:hover:hover").length is 0
PASS getComputedStyle(document.getElementById("target")).color is "rgb(1, 2, 3)"
PASS document.querySelectorAll(":hover:active").length is 0
PASS getComputedStyle(document.getElementById("target")).color is "rgb(1, 2, 3)"
PASS document.querySelectorAll(":active:hover").length is 0
PASS getComputedStyle(document.getElementById("target")).color is "rgb(1, 2, 3)"
PASS document.querySelectorAll(":active:hover:active").length is 0
PASS getComputedStyle(document.getElementById("target")).color is "rgb(1, 2, 3)"
PASS document.querySelectorAll("div:hover").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("#target:hover").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":hover#target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("#target:hover#target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(".aClass:hover").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":hover.aClass").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(".aClass:hover.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(":hover[webkit]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("[id]:hover[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(":hover[webkit=rocks]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("[id=target]:hover[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(":hover[webkit^=ro]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("[id^=ta]:hover[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(":hover[webkit$=ks]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("[id$=et]:hover[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(":hover[webkit*=ck]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("[id*=rg]:hover[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(":hover[webkit~=rocks]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("[id~=target]:hover[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(":hover[webkit|=rocks]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("[id|=target]:hover[webkit|=rocks]").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":nth-child(1):hover").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":hover:nth-child(1)").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":nth-child(1):hover:nth-child(1)").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":nth-child(n):hover > #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":hover:nth-child(n) > #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":nth-child(n):hover:nth-child(n) > #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":nth-child(n):hover #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":hover:nth-child(n) #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":nth-child(n):hover:nth-child(n) #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":hover:-webkit-any(*) #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":-webkit-any(:hover) #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":-webkit-any(*):hover #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":-webkit-any(*):hover:-webkit-any(*) #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":hover:not(gecko) #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":not(gecko):hover #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":not(gecko):hover:not(gecko) #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":hover:not([webkit^=\"\"]) #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":not([webkit^=\"\"]):hover #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":hover:not(:nth-child(-1)) #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":not(:nth-child(-1)):hover #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS successfullyParsed is true
TEST COMPLETE