- Revision
- 220985
- Author
- [email protected]
- Date
- 2017-08-21 15:17:24 -0700 (Mon, 21 Aug 2017)
Log Message
Stop media/video-controls-toggling.html from timing out.
https://bugs.webkit.org/show_bug.cgi?id=116266
Patch by Ms2ger <[email protected]> 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.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (220984 => 220985)
--- trunk/LayoutTests/ChangeLog 2017-08-21 21:58:58 UTC (rev 220984)
+++ trunk/LayoutTests/ChangeLog 2017-08-21 22:17:24 UTC (rev 220985)
@@ -1,3 +1,22 @@
+2017-08-21 Ms2ger <[email protected]>
+
+ Stop media/video-controls-toggling.html from timing out.
+ https://bugs.webkit.org/show_bug.cgi?id=116266
+
+ 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.
+
2017-08-21 Dean Jackson <[email protected]>
Persistent WebGL Warning "vertex WARNING: 0:1: extension 'GL_ARB_gpu_shader5' is not supported" in Safari 10.1.2
Modified: trunk/LayoutTests/media/video-controls-toggling-expected.txt (220984 => 220985)
--- trunk/LayoutTests/media/video-controls-toggling-expected.txt 2017-08-21 21:58:58 UTC (rev 220984)
+++ trunk/LayoutTests/media/video-controls-toggling-expected.txt 2017-08-21 22:17:24 UTC (rev 220985)
@@ -1,4 +1,4 @@
-Tests that showing / hiding video controls uses the sets the display:none property
+Tests that showing / hiding video controls uses the display:none property
** Playing the video **
@@ -8,13 +8,13 @@
RUN(eventSender.mouseMoveTo(muteButtonCoordinates[0], muteButtonCoordinates[1]))
** Test that controls are shown when controls attribute is present **
-EXPECTED (panel.style['display'] != 'none') OK
+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 (panel.style['display'] == 'none') OK
+EXPECTED (getComputedStyle(panel).display == 'none') OK
** Remove controls attribute**
RUN(video.removeAttribute('controls'))
@@ -23,7 +23,7 @@
RUN(eventSender.mouseMoveTo(muteButtonCoordinates[0], muteButtonCoordinates[1]))
** Video controls should not be shown **
-EXPECTED (panel.style['display'] == 'none') OK
+EXPECTED (getComputedStyle(panel).display == 'none') OK
END OF TEST
Modified: trunk/LayoutTests/media/video-controls-toggling.html (220984 => 220985)
--- trunk/LayoutTests/media/video-controls-toggling.html 2017-08-21 21:58:58 UTC (rev 220984)
+++ trunk/LayoutTests/media/video-controls-toggling.html 2017-08-21 22:17:24 UTC (rev 220985)
@@ -40,7 +40,7 @@
consoleWrite("");
consoleWrite("** Test that controls are shown when controls attribute is present **");
- testExpected("panel.style['display']", 'none', "!=");
+ testExpected("getComputedStyle(panel).display", 'none', "!=");
if (window.eventSender) {
consoleWrite("");
@@ -53,7 +53,7 @@
function continueTest()
{
- if (panel.style['display'] != 'none') {
+ if (getComputedStyle(panel).display != 'none') {
setTimeout(continueTest, fadeoutTime);
return;
}
@@ -60,7 +60,7 @@
consoleWrite("");
consoleWrite("** The controls should have the display property set to none");
- testExpected("panel.style['display']", 'none', "==");
+ testExpected("getComputedStyle(panel).display", 'none', "==");
consoleWrite("");
consoleWrite("** Remove controls attribute**");
@@ -72,7 +72,7 @@
consoleWrite("");
consoleWrite("** Video controls should not be shown **");
- testExpected("panel.style['display']", 'none', "==");
+ testExpected("getComputedStyle(panel).display", 'none', "==");
consoleWrite("");
@@ -82,7 +82,7 @@
</script>
</head>
<body _onload_="init()">
- Tests that showing / hiding video controls uses the sets the display:none property<br>
+ Tests that showing / hiding video controls uses the display:none property<br>
<video _onplay_="test()" controls></video>
</body>
</html>
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (220984 => 220985)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2017-08-21 21:58:58 UTC (rev 220984)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2017-08-21 22:17:24 UTC (rev 220985)
@@ -2117,9 +2117,6 @@
webkit.org/b/130971 media/track/track-remove-track.html [ Timeout ]
-# After webkit.org/b/123097 we flag these tests that also fail in mac
-webkit.org/b/123097 media/video-controls-toggling.html [ Timeout ]
-
webkit.org/b/145053 http/tests/xmlhttprequest/origin-exact-matching.html [ Timeout Pass ]
webkit.org/b/145168 media/track/track-cue-inline-assertion-crash.html [ Timeout Pass ]
Copied: trunk/LayoutTests/platform/gtk/media/video-controls-toggling-expected.txt (from rev 220984, trunk/LayoutTests/media/video-controls-toggling-expected.txt) (0 => 220985)
--- trunk/LayoutTests/platform/gtk/media/video-controls-toggling-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/gtk/media/video-controls-toggling-expected.txt 2017-08-21 22:17:24 UTC (rev 220985)
@@ -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
+