diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 2bfd6f8312f8..d1dae8cf9848 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,22 @@ +2017-08-21 Ms2ger + + 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 Ms2ger [GTK][WPE] Rebaseline tests with list item markers. diff --git a/LayoutTests/media/video-controls-toggling-expected.txt b/LayoutTests/media/video-controls-toggling-expected.txt index 8b890290514a..04493762375b 100644 --- a/LayoutTests/media/video-controls-toggling-expected.txt +++ b/LayoutTests/media/video-controls-toggling-expected.txt @@ -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(video.play()) 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(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 diff --git a/LayoutTests/media/video-controls-toggling.html b/LayoutTests/media/video-controls-toggling.html index 73c396626170..0175402f3530 100644 --- a/LayoutTests/media/video-controls-toggling.html +++ b/LayoutTests/media/video-controls-toggling.html @@ -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,14 +53,14 @@ 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**"); @@ -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 @@ - Tests that showing / hiding video controls uses the sets the display:none property
+ Tests that showing / hiding video controls uses the display:none property
diff --git a/LayoutTests/platform/gtk/TestExpectations b/LayoutTests/platform/gtk/TestExpectations index 1268f3eaeeba..dcd4ad411959 100644 --- a/LayoutTests/platform/gtk/TestExpectations +++ b/LayoutTests/platform/gtk/TestExpectations @@ -2134,9 +2134,6 @@ webkit.org/b/143990 media/track/track-disabled.html [ Timeout Pass ] 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 ] diff --git a/LayoutTests/platform/gtk/media/video-controls-toggling-expected.txt b/LayoutTests/platform/gtk/media/video-controls-toggling-expected.txt new file mode 100644 index 000000000000..e7dc66905a0b --- /dev/null +++ b/LayoutTests/platform/gtk/media/video-controls-toggling-expected.txt @@ -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 +