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