OLD | NEW |
1 <body> | 1 <body> |
2 <p>This tests that the video element's controls are draggable in full screen
. Press any key to continue.</p> | 2 <p>This tests that the video element's controls are draggable in full screen
. Press any key to continue.</p> |
3 <video id="video" width="300"></video> | 3 <video id="video" width="300"></video> |
4 <script> | 4 <script> |
5 if (window.internals) | 5 if (window.internals) |
6 runPixelTests = internals.runtimeFlags.overlayFullscreenVideoEnabled
; | 6 runPixelTests = internals.runtimeFlags.overlayFullscreenVideoEnabled
; |
7 </script> | 7 </script> |
8 <script src="full-screen-test.js"></script> | 8 <script src="full-screen-test.js"></script> |
9 <script src="../media/media-controls.js"></script> | 9 <script src="../media/media-controls.js"></script> |
10 <script> | 10 <script> |
11 var video = document.getElementById('video'); | 11 var video = document.getElementById('video'); |
12 var shadowRoot; | 12 var shadowRoot; |
13 var panel; | 13 var panel; |
14 var startBox; | 14 var startBox; |
15 var endBox; | 15 var endBox; |
16 | 16 |
17 var fullscreenChanged = function(event) | 17 var fullscreenChanged = function(event) |
18 { | 18 { |
19 if (callback) | 19 if (callback) |
20 callback(event) | 20 callback(event) |
21 }; | 21 }; |
22 waitForEvent(document, 'webkitfullscreenchange', function() { | 22 waitForEvent(document, 'webkitfullscreenchange', function() { |
23 if (window.internals) { | 23 if (window.internals) { |
24 panel = mediaControlsElement(internals.shadowRoot(video).firstCh
ild, '-webkit-media-controls-panel'); | 24 panel = mediaControlsElement(internals.shadowRoot(video).firstCh
ild, '-internal-media-controls-panel'); |
25 startBox = internals.boundingBox(panel); | 25 startBox = internals.boundingBox(panel); |
26 | 26 |
27 consoleWrite("First drag."); | 27 consoleWrite("First drag."); |
28 | 28 |
29 eventSender.mouseMoveTo(startBox.left + 5, startBox.top + 5); | 29 eventSender.mouseMoveTo(startBox.left + 5, startBox.top + 5); |
30 eventSender.mouseDown(); | 30 eventSender.mouseDown(); |
31 | 31 |
32 eventSender.mouseMoveTo(startBox.left + 20, startBox.top + 20); | 32 eventSender.mouseMoveTo(startBox.left + 20, startBox.top + 20); |
33 eventSender.mouseUp(); | 33 eventSender.mouseUp(); |
34 | 34 |
(...skipping 15 matching lines...) Expand all Loading... |
50 | 50 |
51 endTest(); | 51 endTest(); |
52 } | 52 } |
53 else | 53 else |
54 logResult(false, "window.internals == undefined"); | 54 logResult(false, "window.internals == undefined"); |
55 }); | 55 }); |
56 | 56 |
57 runWithKeyDown(function(){video.webkitRequestFullScreen()}); | 57 runWithKeyDown(function(){video.webkitRequestFullScreen()}); |
58 </script> | 58 </script> |
59 </body> | 59 </body> |
OLD | NEW |