| OLD | NEW |
| (Empty) |
| 1 <body> | |
| 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> | |
| 4 <script> | |
| 5 if (window.internals) | |
| 6 runPixelTests = internals.runtimeFlags.overlayFullscreenVideoEnabled
; | |
| 7 </script> | |
| 8 <script src="full-screen-test.js"></script> | |
| 9 <script src="../media/media-controls.js"></script> | |
| 10 <script> | |
| 11 var video = document.getElementById('video'); | |
| 12 var shadowRoot; | |
| 13 var panel; | |
| 14 var startBox; | |
| 15 var endBox; | |
| 16 | |
| 17 var fullscreenChanged = function(event) | |
| 18 { | |
| 19 if (callback) | |
| 20 callback(event) | |
| 21 }; | |
| 22 waitForEvent(document, 'webkitfullscreenchange', function() { | |
| 23 if (window.internals) { | |
| 24 panel = mediaControlsElement(internals.shadowRoot(video).firstCh
ild, '-webkit-media-controls-panel'); | |
| 25 startBox = internals.boundingBox(panel); | |
| 26 | |
| 27 consoleWrite("First drag."); | |
| 28 | |
| 29 eventSender.mouseMoveTo(startBox.left + 5, startBox.top + 5); | |
| 30 eventSender.mouseDown(); | |
| 31 | |
| 32 eventSender.mouseMoveTo(startBox.left + 20, startBox.top + 20); | |
| 33 eventSender.mouseUp(); | |
| 34 | |
| 35 endBox = internals.boundingBox(panel); | |
| 36 | |
| 37 testExpected("endBox.left - startBox.left", 15); | |
| 38 testExpected("endBox.top - startBox.top", 15); | |
| 39 | |
| 40 consoleWrite("Second drag."); | |
| 41 | |
| 42 eventSender.mouseDown(); | |
| 43 eventSender.mouseMoveTo(startBox.left + 10, startBox.top + 10); | |
| 44 eventSender.mouseUp(); | |
| 45 | |
| 46 endBox = internals.boundingBox(panel); | |
| 47 | |
| 48 testExpected("endBox.left - startBox.left", 5); | |
| 49 testExpected("endBox.top - startBox.top", 5); | |
| 50 | |
| 51 endTest(); | |
| 52 } | |
| 53 else | |
| 54 logResult(false, "window.internals == undefined"); | |
| 55 }); | |
| 56 | |
| 57 runWithKeyDown(function(){video.webkitRequestFullScreen()}); | |
| 58 </script> | |
| 59 </body> | |
| OLD | NEW |