Title: [220974] trunk/LayoutTests
Revision
220974
Author
[email protected]
Date
2017-08-21 12:06:36 -0700 (Mon, 21 Aug 2017)

Log Message

Re-enable tests based on media-fullscreen.js for GTK.
https://bugs.webkit.org/show_bug.cgi?id=175770

Patch by Ms2ger <[email protected]> on 2017-08-21
Reviewed by Eric Carlson.

The media-fullscreen-not-in-document test checks that a disconnected
element can go fullscreen, while the code explicitly disallows that
(in Document::requestFullScreenForElement). Update the test to match
the code.

The media-fullscreen-inline test will now fail more clearly if the
attempt to go fullscreen is rejected (which it isn't).

* media/media-fullscreen-not-in-document-expected.txt: rebaseline.
* media/media-fullscreen.js:
(fullscreenerror): pass the test if the webkitfullscreenerror
(addEventListeners): add a webkitfullscreenerror event handler
* platform/gtk/TestExpectations: remove failure expectations.
* platform/gtk/media/media-fullscreen-not-in-document-expected.txt:
  Copied from LayoutTests/media/media-fullscreen-not-in-document-expected.txt.
  This copy leaves out the webkitSupportsPresentationMode check that's
  disabled on GTK.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (220973 => 220974)


--- trunk/LayoutTests/ChangeLog	2017-08-21 18:45:35 UTC (rev 220973)
+++ trunk/LayoutTests/ChangeLog	2017-08-21 19:06:36 UTC (rev 220974)
@@ -1,3 +1,28 @@
+2017-08-21  Ms2ger  <[email protected]>
+
+        Re-enable tests based on media-fullscreen.js for GTK.
+        https://bugs.webkit.org/show_bug.cgi?id=175770
+
+        Reviewed by Eric Carlson.
+
+        The media-fullscreen-not-in-document test checks that a disconnected
+        element can go fullscreen, while the code explicitly disallows that
+        (in Document::requestFullScreenForElement). Update the test to match
+        the code.
+
+        The media-fullscreen-inline test will now fail more clearly if the
+        attempt to go fullscreen is rejected (which it isn't).
+
+        * media/media-fullscreen-not-in-document-expected.txt: rebaseline.
+        * media/media-fullscreen.js:
+        (fullscreenerror): pass the test if the webkitfullscreenerror
+        (addEventListeners): add a webkitfullscreenerror event handler
+        * platform/gtk/TestExpectations: remove failure expectations.
+        * platform/gtk/media/media-fullscreen-not-in-document-expected.txt:
+          Copied from LayoutTests/media/media-fullscreen-not-in-document-expected.txt.
+          This copy leaves out the webkitSupportsPresentationMode check that's
+          disabled on GTK.
+
 2017-08-21  Matt Lewis  <[email protected]>
 
         Marked inspector/css/add-rule.html as flaky on macOS

Modified: trunk/LayoutTests/media/media-fullscreen-not-in-document-expected.txt (220973 => 220974)


--- trunk/LayoutTests/media/media-fullscreen-not-in-document-expected.txt	2017-08-21 18:45:35 UTC (rev 220973)
+++ trunk/LayoutTests/media/media-fullscreen-not-in-document-expected.txt	2017-08-21 19:06:36 UTC (rev 220974)
@@ -16,10 +16,8 @@
 EVENT(mouseup)
 * event handler triggered by user gesture
 RUN(mediaElement.webkitEnterFullScreen())
-EVENT(webkitbeginfullscreen)
-EXPECTED (mediaElement.webkitDisplayingFullscreen == 'true') OK
-RUN(mediaElement.webkitExitFullScreen())
-EVENT(webkitendfullscreen)
+EVENT(webkitfullscreenerror)
+EXPECTED (mediaElement.webkitDisplayingFullscreen == 'false') OK
 
 *** Creating <audio> element with "content/silence.mpg" not in the document, should NOT support fullscreen 
 EVENT(loadstart)

Modified: trunk/LayoutTests/media/media-fullscreen.js (220973 => 220974)


--- trunk/LayoutTests/media/media-fullscreen.js	2017-08-21 18:45:35 UTC (rev 220973)
+++ trunk/LayoutTests/media/media-fullscreen.js	2017-08-21 19:06:36 UTC (rev 220974)
@@ -46,6 +46,17 @@
     setTimeout(openNextMovie, 10);
 }
 
+function fullscreenerror()
+{
+    var movie = movieInfo.movies[movieInfo.current];
+    if (movie.inline) {
+        failTest("Unexpected fullscreenerror event");
+    } else {
+        testExpected("mediaElement.webkitDisplayingFullscreen", false);
+        openNextMovie();
+    }
+}
+
 function canplaythrough()
 {
     var movie = movieInfo.movies[movieInfo.current];
@@ -126,5 +137,6 @@
     waitForEvent('webkitbeginfullscreen', beginfullscreen);
     waitForEvent('webkitendfullscreen', endfullscreen);
     waitForEvent('webkitfullscreenchange', fullscreenchange);
+    waitForEvent('webkitfullscreenerror', fullscreenerror);
 }
 

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (220973 => 220974)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2017-08-21 18:45:35 UTC (rev 220973)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2017-08-21 19:06:36 UTC (rev 220974)
@@ -156,11 +156,6 @@
 # Requires media engine closed caption support.
 media/media-captions.html [ WontFix Failure ]
 
-# Legacy full screen API tests are now obsolete.
-# This passes while it's marked as a WontFix - check it.
-media/media-fullscreen-inline.html [ WontFix Crash Pass ]
-media/media-fullscreen-not-in-document.html [ WontFix Timeout Crash ]
-
 # Features that we want eventually:
 # DeviceMotion and DeviceOrientation are not enabled by default.
 webkit.org/b/98927 fast/dom/Window/window-properties-device-orientation.html [ Skip ]

Copied: trunk/LayoutTests/platform/gtk/media/media-fullscreen-not-in-document-expected.txt (from rev 220973, trunk/LayoutTests/media/media-fullscreen-not-in-document-expected.txt) (0 => 220974)


--- trunk/LayoutTests/platform/gtk/media/media-fullscreen-not-in-document-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/gtk/media/media-fullscreen-not-in-document-expected.txt	2017-08-21 19:06:36 UTC (rev 220974)
@@ -0,0 +1,34 @@
+Test media element fullscreen API when an element is not in the DOM.
+
+
+
+
+*** Creating <video> element with "content/counting.mp4" not in the document, should support fullscreen because it has video
+EVENT(loadstart)
+EVENT(durationchange)
+EVENT(canplaythrough)
+* event handler NOT triggered by a user gesture
+EXPECTED (mediaElement.webkitSupportsFullscreen == 'true') OK
+EXPECTED (mediaElement.webkitDisplayingFullscreen == 'false') OK
+TEST(mediaElement.webkitEnterFullScreen()) THROWS(DOMException.INVALID_STATE_ERR) OK
+* clicking on button
+EVENT(mouseup)
+* event handler triggered by user gesture
+RUN(mediaElement.webkitEnterFullScreen())
+EVENT(webkitfullscreenerror)
+EXPECTED (mediaElement.webkitDisplayingFullscreen == 'false') OK
+
+*** Creating <audio> element with "content/silence.mpg" not in the document, should NOT support fullscreen 
+EVENT(loadstart)
+EVENT(durationchange)
+EVENT(canplaythrough)
+* event handler NOT triggered by a user gesture
+EXPECTED (mediaElement.webkitSupportsFullscreen == 'undefined') OK
+EXPECTED (mediaElement.webkitSupportsPresentationMode == 'undefined') OK
+EXPECTED (mediaElement.webkitDisplayingFullscreen == 'undefined') OK
+* clicking on button
+EVENT(mouseup)
+* event handler triggered by user gesture
+
+END OF TEST
+
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to