OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style> |
| 3 /* Offset body by 50px so that buttons clearly change position when they enter/e
xit fullscreen. */ |
| 4 body { |
| 5 position: relative; |
| 6 left: 50px; |
| 7 } |
| 8 </style> |
2 <script src="../resources/js-test.js"></script> | 9 <script src="../resources/js-test.js"></script> |
3 <script src="full-screen-test.js"></script> | 10 <script src="full-screen-test.js"></script> |
4 <script src="../fast/events/touch/resources/touch-hover-active-tests.js"></scrip
t> | 11 <script src="../fast/events/touch/resources/touch-hover-active-tests.js"></scrip
t> |
5 <link rel="stylesheet" href="../fast/events/touch/resources/touch-hover-active-t
ests.css"> | 12 <link rel="stylesheet" href="../fast/events/touch/resources/touch-hover-active-t
ests.css"> |
6 | 13 |
7 <button id="enter" class='touch-interactive' onclick="document.body.webkitReques
tFullScreen()">Go full screen</button> | 14 <button id="enter" class='touch-interactive' onclick="document.body.webkitReques
tFullScreen()">Go full screen</button> |
8 <button id="exit" class='touch-interactive' onclick="document.webkitCancelFullSc
reen()">Exit full screen</button> | 15 <button id="exit" class='touch-interactive' onclick="document.webkitCancelFullSc
reen()">Exit full screen</button> |
9 | 16 |
10 <script> | 17 <script> |
11 var enterButton; | 18 var enterButton; |
(...skipping 24 matching lines...) Expand all Loading... |
36 | 43 |
37 var exitButtonCenter = elementCenter(exitButton); | 44 var exitButtonCenter = elementCenter(exitButton); |
38 // Hover on and click the "Exit fullscreen" button | 45 // Hover on and click the "Exit fullscreen" button |
39 eventSender.mouseMoveTo(exitButtonCenter.x, exitButtonCenter.y); | 46 eventSender.mouseMoveTo(exitButtonCenter.x, exitButtonCenter.y); |
40 eventSender.mouseDown(); | 47 eventSender.mouseDown(); |
41 eventSender.mouseUp(); | 48 eventSender.mouseUp(); |
42 }); | 49 }); |
43 | 50 |
44 | 51 |
45 // Move mouse over to the "Go fullscreen" button and click | 52 // Move mouse over to the "Go fullscreen" button and click |
46 eventSender.mouseMoveTo(enterButtonCenter.x, enterButtonCenter.y); | 53 // We move by 50px in the x-direction to account for the relative position. |
| 54 eventSender.mouseMoveTo(enterButtonCenter.x + 50, enterButtonCenter.y); |
47 eventSender.mouseDown(); | 55 eventSender.mouseDown(); |
48 eventSender.mouseUp(); | 56 eventSender.mouseUp(); |
49 } | 57 } |
50 | 58 |
51 runTest(); | 59 runTest(); |
52 </script> | 60 </script> |
OLD | NEW |