Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fullscreen / enter-exit-full-screen-hover.html
blob1aa60aabd5f07469beb55a5a9fc2c54bd2fee042
1 <!DOCTYPE html>
2 <script src="../resources/js-test.js"></script>
3 <script src="full-screen-test.js"></script>
4 <script src="../fast/events/touch/resources/touch-hover-active-tests.js"></script>
5 <link rel="stylesheet" href="../fast/events/touch/resources/touch-hover-active-tests.css">
7 <button id="enter" class='touch-interactive' onclick="document.body.webkitRequestFullScreen()">Go full screen</button>
8 <button id="exit" class='touch-interactive' onclick="document.webkitCancelFullScreen()">Exit full screen</button>
10 <script>
11 var enterButton;
12 var exitButton;
14 function runTest() {
15 if (!window.eventSender) {
16 debug('This test requires DRT.');
17 return;
20 enterButton = document.getElementById('enter');
21 exitButton = document.getElementById('exit');
23 var enterButtonCenter = elementCenter(enterButton);
25 waitForEventOnce(document, 'webkitfullscreenchange', function() {
26 shouldBeTrue("document.webkitIsFullScreen")
27 // After entering fullscreen, the button should lose hover
28 shouldBeDefault("getHoverActiveState(enterButton)")
30 waitForEventOnce(document, 'webkitfullscreenchange', function() {
31 shouldBeFalse("document.webkitIsFullScreen")
32 // After leaving fullscreen, the button should lose hover
33 shouldBeDefault("getHoverActiveState(exitButton)")
34 endTest();
35 });
37 var exitButtonCenter = elementCenter(exitButton);
38 // Hover on and click the "Exit fullscreen" button
39 eventSender.mouseMoveTo(exitButtonCenter.x, exitButtonCenter.y);
40 eventSender.mouseDown();
41 eventSender.mouseUp();
42 });
45 // Move mouse over to the "Go fullscreen" button and click
46 eventSender.mouseMoveTo(enterButtonCenter.x, enterButtonCenter.y);
47 eventSender.mouseDown();
48 eventSender.mouseUp();
51 runTest();
52 </script>