Fullscreen media controls are unusable in pagination mode
[WebKit-https.git] / LayoutTests / fullscreen / video-cursor-auto-hide.html
1 <body>
2     <p>This tests that the cursor hides after hovering over a video element in full screen mode.</p>
3     <div id=wrapper>
4         <video id="video" width="300"></video>
5     </div>
6     <script src="full-screen-test.js"></script>
7     <script>
8         var wrapper = document.getElementById('wrapper');
9         var video = document.getElementById('video');
10
11         function checkForHiddenMouse()
12         {
13             testExpected('window.internals.getCurrentCursorInfo()', 'type=None hotSpot=0,0');
14             endTest();
15         }
16
17         function fullscreenChanged(event)
18         {
19             if (window.internals) {
20                 internals.settings.setTimeWithoutMouseMovementBeforeHidingControls(0);
21                 videoBox = internals.boundingBox(video);
22                 eventSender.mouseMoveTo(videoBox.left + videoBox.width / 2, videoBox.top + videoBox.height / 2);
23                 testExpected('window.internals.getCurrentCursorInfo()', 'type=Pointer hotSpot=0,0');
24                 setTimeout(checkForHiddenMouse, 0);
25             }
26             else
27                 logResult(false, "window.internals == undefined");
28         }
29         waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
30         runWithKeyDown(function(){wrapper.webkitRequestFullScreen()});
31     </script>
32 </body>