2 <script src=
"../../../../resources/js-test.js"></script>
3 <link rel=
"stylesheet" href=
"../resources/touch-hover-active-tests.css">
4 <style type=
"text/css">
27 <div id=
"box" class=
"touch-interactive">Gestures go here
</div>
29 <iframe id=
"frame"></iframe>
32 <p id=
"description"></p>
33 <div id=
"console"></div>
35 <script src=
"../resources/touch-hover-active-tests.js"></script>
37 var box
= document
.getElementById("box");
38 description("Tests that tap gesture events on a an element covered by a hidden iframe set and clear the active state.");
40 window
.jsTestIsAsync
= true;
44 if (!window
.eventSender
) {
45 debug("This test requires DRT.");
49 if (!eventSender
.gestureShowPress
) {
50 debug("GestureShowPress is not supported by this platform");
54 debug("Verify active isn't initially set");
55 shouldBeDefault("getHoverActiveState(box)");
57 debug("Verify showPress, tap sets and clears active");
58 eventSender
.gestureTapDown(50, 50);
59 eventSender
.gestureShowPress(50, 50);
60 shouldBeHoveredAndActive("getHoverActiveState(box)");
61 eventSender
.gestureTap(50, 50);
62 waitUntilActiveCleared();
65 function waitUntilActiveCleared()
67 if (getHoverActiveState(box
) == "hoveredAndActive") {
68 return setTimeout(waitUntilActiveCleared
, 10);
71 shouldBeOnlyHovered("getHoverActiveState(box)");
76 window
.onload
= runTests
;