Methods on window.internals shouldn't pass a document.
[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
10         function checkForHiddenMouse()
11         {
12             testExpected('window.internals.getCurrentCursorInfo()', 'type=None hotSpot=0,0');
13             endTest();
14         }
15
16         function fullscreenChanged(event)
17         {
18             if (window.internals) {
19                 internals.settings.setTimeWithoutMouseMovementBeforeHidingControls(0);
20                 wrapperBox = internals.boundingBox(wrapper);
21                 eventSender.mouseMoveTo(wrapperBox.left + wrapperBox.width / 2, wrapperBox.top + wrapperBox.height / 2);
22                 testExpected('window.internals.getCurrentCursorInfo()', 'type=Pointer hotSpot=0,0');
23                 setTimeout(checkForHiddenMouse, 0);
24             }
25             else
26                 logResult(false, "window.internals == undefined");
27         }
28         waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
29         runWithKeyDown(function(){wrapper.webkitRequestFullScreen()});
30     </script>
31 </body>