blob: 035f1024a860601a8215853a869d806011bf0134 [file] [log] [blame]
Test the :hover selector when the document is in strict 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("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(":-webkit-any(:hover) #target").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll(":hover").length is 3
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("*:hover").length is 3
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS successfullyParsed is true
TEST COMPLETE