 Chromium Code Reviews
 Chromium Code Reviews Issue 892963003:
  Ensure media control goes to transparent(hide) after seek by touch  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master
    
  
    Issue 892963003:
  Ensure media control goes to transparent(hide) after seek by touch  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master| Index: LayoutTests/media/video-controls-auto-hide-after-seek-by-touch.html | 
| diff --git a/LayoutTests/media/video-controls-hide-on-move-outside-controls.html b/LayoutTests/media/video-controls-auto-hide-after-seek-by-touch.html | 
| similarity index 69% | 
| copy from LayoutTests/media/video-controls-hide-on-move-outside-controls.html | 
| copy to LayoutTests/media/video-controls-auto-hide-after-seek-by-touch.html | 
| index 1e0cff1047982bb2d68428e4e74e9ea03792af11..d98803a131838474e0bdbc3266281ec9550f0f45 100644 | 
| --- a/LayoutTests/media/video-controls-hide-on-move-outside-controls.html | 
| +++ b/LayoutTests/media/video-controls-auto-hide-after-seek-by-touch.html | 
| @@ -10,11 +10,21 @@ | 
| <script src=media-file.js></script> | 
| <script src=media-controls.js></script> | 
| <script> | 
| + | 
| var controls; | 
| +function dispatchActivateEvent(target) { | 
| + // Create a DOMActivate event and dispatch it | 
| + var event = document.createEvent('UIEvents'); | 
| + event.initUIEvent('DOMActivate', true, true, window, 1) | 
| + target.dispatchEvent(event); | 
| 
fs
2015/02/06 15:20:59
Inconsistent indentation.
 | 
| +} | 
| + | 
| + | 
| function runTest() | 
| { | 
| video = document.getElementById("no-video-media"); | 
| + controls = mediaControlsButton(video, "panel"); | 
| testExpected("video.paused", true); | 
| if (!window.testRunner) | 
| @@ -24,26 +34,22 @@ function runTest() | 
| var playCoords = mediaControlsButtonCoordinates(video, "play-button"); | 
| var clickX = playCoords[0]; | 
| var clickY = playCoords[1]; | 
| - eventSender.mouseMoveTo(clickX, clickY); | 
| - eventSender.mouseDown(); | 
| - eventSender.mouseUp(); | 
| + eventSender.gestureTap(clickX, clickY); | 
| + eventSender.gestureTapDown(clickX, clickY); | 
| + dispatchActivateEvent(controls); | 
| 
fs
2015/02/06 13:43:32
Won't the activate event be generated as a side-ef
 
william.xie1
2015/02/06 14:59:20
DOMActivate event is intended event from Node::dis
 
fs
2015/02/06 15:20:59
Yes, but if it will be generated anyway, then it d
 | 
| + | 
| testExpected("video.paused", false); | 
| runAfterHideMediaControlsTimerFired(function() | 
| { | 
| - controls = mediaControlsButton(video, "panel"); | 
| testExpected("getComputedStyle(controls).opacity", 0); | 
| consoleWrite(""); | 
| endTest(); | 
| }, video); | 
| - | 
| - // Move the mouse to the upper-left corner of the video. | 
| - eventSender.mouseMoveTo(video.offsetLeft + 4, video.offsetTop + 4); | 
| } | 
| </script> | 
| <body> | 
| - <p>Test video element control visibility when mouse is not over element.</p> | 
| 
fs
2015/02/06 13:43:32
I think keeping some for of description would be g
 | 
| <p>This test only runs in DRT!</p> | 
| <video id="no-video-media" controls loop oncanplaythrough="runTest()"></video> |