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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220985
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2017-08-21 Ms2ger <Ms2ger@gmail.com>
+
+ 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 <dino@apple.com>
Persistent WebGL Warning "vertex WARNING: 0:1: extension 'GL_ARB_gpu_shader5' is not supported" in Safari 10.1.2
-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 **
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'))
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
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("");
function continueTest()
{
- if (panel.style['display'] != 'none') {
+ if (getComputedStyle(panel).display != 'none') {
setTimeout(continueTest, fadeoutTime);
return;
}
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**");
consoleWrite("");
consoleWrite("** Video controls should not be shown **");
- testExpected("panel.style['display']", 'none', "==");
+ testExpected("getComputedStyle(panel).display", 'none', "==");
consoleWrite("");
</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>
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 ]
--- /dev/null
+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
+