OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <script src="../../../js/resources/js-test-pre.js"></script> | 3 <script src="../../../js/resources/js-test-pre.js"></script> |
4 <style type="text/css"> | 4 <style type="text/css"> |
5 #box { | 5 #box { |
6 background-color: blue; | 6 background-color: blue; |
7 width: 300px; | 7 width: 300px; |
8 height: 100px; | 8 height: 100px; |
9 } | 9 } |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 if (!window.eventSender) { | 45 if (!window.eventSender) { |
46 debug('This test requires DRT.'); | 46 debug('This test requires DRT.'); |
47 return; | 47 return; |
48 } | 48 } |
49 | 49 |
50 if (!eventSender.gestureTapDown) { | 50 if (!eventSender.gestureTapDown) { |
51 debug('GestureTapDown is not supported by this platform'); | 51 debug('GestureTapDown is not supported by this platform'); |
52 return; | 52 return; |
53 } | 53 } |
54 | 54 |
| 55 // Mouse events only work after an initial layout |
| 56 document.body.offsetLeft; |
| 57 |
55 debug("Verify active isn't initially set"); | 58 debug("Verify active isn't initially set"); |
56 shouldBeFalse("isBoxActive()"); | 59 shouldBeFalse("isBoxActive()"); |
57 | 60 |
58 debug("Verify tapdown,tap sets and clears active"); | 61 debug("Verify tapdown,tap sets and clears active"); |
59 eventSender.gestureTapDown(50, 50); | 62 eventSender.gestureTapDown(50, 50); |
60 shouldBeTrue("isBoxActive()"); | 63 shouldBeTrue("isBoxActive()"); |
61 eventSender.gestureTap(50, 50); | 64 eventSender.gestureTap(50, 50); |
62 shouldBeFalse("isBoxActive()"); | 65 shouldBeFalse("isBoxActive()"); |
63 | 66 |
64 debug("Verify tapdown,tapcancel on the element sets and clears active"); | 67 debug("Verify tapdown,tapcancel on the element sets and clears active"); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 shouldBeTrue("isBoxActive()"); | 100 shouldBeTrue("isBoxActive()"); |
98 eventSender.gestureTap(50, 50); | 101 eventSender.gestureTap(50, 50); |
99 shouldBeFalse("isBoxActive()"); | 102 shouldBeFalse("isBoxActive()"); |
100 } | 103 } |
101 | 104 |
102 runTests(); | 105 runTests(); |
103 </script> | 106 </script> |
104 <script src="../../../js/resources/js-test-post.js"></script> | 107 <script src="../../../js/resources/js-test-post.js"></script> |
105 </body> | 108 </body> |
106 </html> | 109 </html> |
OLD | NEW |