Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(535)

Unified Diff: LayoutTests/fullscreen/enter-exit-full-screen-hover.html

Issue 552903004: Update hover state after entering and leaving fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Revised Layouttest case Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fullscreen/enter-exit-full-screen-hover-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fullscreen/enter-exit-full-screen-hover.html
diff --git a/LayoutTests/fullscreen/enter-exit-full-screen-hover.html b/LayoutTests/fullscreen/enter-exit-full-screen-hover.html
new file mode 100644
index 0000000000000000000000000000000000000000..1aa60aabd5f07469beb55a5a9fc2c54bd2fee042
--- /dev/null
+++ b/LayoutTests/fullscreen/enter-exit-full-screen-hover.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<script src="../resources/js-test.js"></script>
+<script src="full-screen-test.js"></script>
+<script src="../fast/events/touch/resources/touch-hover-active-tests.js"></script>
+<link rel="stylesheet" href="../fast/events/touch/resources/touch-hover-active-tests.css">
+
+<button id="enter" class='touch-interactive' onclick="document.body.webkitRequestFullScreen()">Go full screen</button>
+<button id="exit" class='touch-interactive' onclick="document.webkitCancelFullScreen()">Exit full screen</button>
+
+<script>
+var enterButton;
+var exitButton;
+
+function runTest() {
+ if (!window.eventSender) {
+ debug('This test requires DRT.');
+ return;
+ }
+
+ enterButton = document.getElementById('enter');
+ exitButton = document.getElementById('exit');
+
+ var enterButtonCenter = elementCenter(enterButton);
+
+ waitForEventOnce(document, 'webkitfullscreenchange', function() {
+ shouldBeTrue("document.webkitIsFullScreen")
+ // After entering fullscreen, the button should lose hover
+ shouldBeDefault("getHoverActiveState(enterButton)")
+
+ waitForEventOnce(document, 'webkitfullscreenchange', function() {
+ shouldBeFalse("document.webkitIsFullScreen")
+ // After leaving fullscreen, the button should lose hover
+ shouldBeDefault("getHoverActiveState(exitButton)")
+ endTest();
+ });
+
+ var exitButtonCenter = elementCenter(exitButton);
+ // Hover on and click the "Exit fullscreen" button
+ eventSender.mouseMoveTo(exitButtonCenter.x, exitButtonCenter.y);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ });
+
+
+ // Move mouse over to the "Go fullscreen" button and click
+ eventSender.mouseMoveTo(enterButtonCenter.x, enterButtonCenter.y);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+}
+
+runTest();
+</script>
« no previous file with comments | « no previous file | LayoutTests/fullscreen/enter-exit-full-screen-hover-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698