Index: third_party/WebKit/LayoutTests/fullscreen/enter-exit-full-screen-hover.html |
diff --git a/third_party/WebKit/LayoutTests/fullscreen/enter-exit-full-screen-hover.html b/third_party/WebKit/LayoutTests/fullscreen/enter-exit-full-screen-hover.html |
index 1aa60aabd5f07469beb55a5a9fc2c54bd2fee042..85f4a279abe616cbc70f93a636ce0a32a546d226 100644 |
--- a/third_party/WebKit/LayoutTests/fullscreen/enter-exit-full-screen-hover.html |
+++ b/third_party/WebKit/LayoutTests/fullscreen/enter-exit-full-screen-hover.html |
@@ -23,22 +23,30 @@ function runTest() { |
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(); |
+ shouldBeTrue("document.webkitIsFullScreen"); |
+ // After entering fullscreen + layout, the button should lose hover. |
+ // TODO(foolip): Synchronize hover state changes with animation frames. |
+ // https://crbug.com/668758 |
+ shouldBeOnlyHovered("getHoverActiveState(enterButton)"); |
+ testRunner.layoutAndPaintAsyncThen(function() { |
+ shouldBeDefault("getHoverActiveState(enterButton)"); |
+ |
+ waitForEventOnce(document, 'webkitfullscreenchange', function() { |
+ shouldBeFalse("document.webkitIsFullScreen"); |
+ // After exiting fullscreen + layout, the button should lose hover. |
+ shouldBeOnlyHovered("getHoverActiveState(exitButton)"); |
+ testRunner.layoutAndPaintAsyncThen(function() { |
+ 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(); |
}); |
- |
- var exitButtonCenter = elementCenter(exitButton); |
- // Hover on and click the "Exit fullscreen" button |
- eventSender.mouseMoveTo(exitButtonCenter.x, exitButtonCenter.y); |
- eventSender.mouseDown(); |
- eventSender.mouseUp(); |
}); |