Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r220985 - Stop media/video-controls-toggling.html from timing out.
https://bugs.webkit.org/show_bug.cgi?id=116266 Patch by Ms2ger <Ms2ger@gmail.com> on 2017-08-21 Reviewed by Dean Jackson. Use getComputedStyle to check the display property. Element::style only contains properties set in the style attribute, but the display property is set through CSS using the 'hidden' class. * media/video-controls-toggling-expected.txt: * media/video-controls-toggling.html: * platform/gtk/TestExpectations: * platform/gtk/media/video-controls-toggling-expected.txt: Copied from LayoutTests/media/video-controls-toggling-expected.txt. I'm not sure where the console message comes from, but it seems to be in the GTK-specific code.
- Loading branch information
1 parent
385c637
commit 1986fab
Showing
5 changed files
with
58 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
LayoutTests/platform/gtk/media/video-controls-toggling-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
CONSOLE MESSAGE: line 122: TypeError: undefined is not an object (evaluating 'this.captionMenu.style') | ||
Tests that showing / hiding video controls uses the display:none property | ||
|
||
|
||
** Playing the video ** | ||
RUN(video.play()) | ||
|
||
** Move mouse somewhere over the panel ** | ||
RUN(eventSender.mouseMoveTo(muteButtonCoordinates[0], muteButtonCoordinates[1])) | ||
|
||
** Test that controls are shown when controls attribute is present ** | ||
EXPECTED (getComputedStyle(panel).display != 'none') OK | ||
|
||
** Move mouse outside the video ** | ||
RUN(eventSender.mouseMoveTo(video.offsetLeft, video.offsetTop + 2 * video.offsetHeight)) | ||
|
||
** The controls should have the display property set to none | ||
EXPECTED (getComputedStyle(panel).display == 'none') OK | ||
|
||
** Remove controls attribute** | ||
RUN(video.removeAttribute('controls')) | ||
|
||
** Move mouse back over the panel ** | ||
RUN(eventSender.mouseMoveTo(muteButtonCoordinates[0], muteButtonCoordinates[1])) | ||
|
||
** Video controls should not be shown ** | ||
EXPECTED (getComputedStyle(panel).display == 'none') OK | ||
|
||
END OF TEST | ||
|