Title: [271407] trunk/LayoutTests
Revision
271407
Author
[email protected]
Date
2021-01-12 10:57:33 -0800 (Tue, 12 Jan 2021)

Log Message

REGRESSION (r271341): media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=220530

Reviewed by Eric Carlson.

Similar to r271377, this patch fixes a layout test failure/timeout by enabling "MockVideoPresentationMode"
and sending a request to enter/exit fullscreen after the current mode change is completed.

* media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline-expected.txt:
* media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html:
* platform/mac/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (271406 => 271407)


--- trunk/LayoutTests/ChangeLog	2021-01-12 17:30:52 UTC (rev 271406)
+++ trunk/LayoutTests/ChangeLog	2021-01-12 18:57:33 UTC (rev 271407)
@@ -1,3 +1,17 @@
+2021-01-12  Peng Liu  <[email protected]>
+
+        REGRESSION (r271341): media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html is timing out
+        https://bugs.webkit.org/show_bug.cgi?id=220530
+
+        Reviewed by Eric Carlson.
+
+        Similar to r271377, this patch fixes a layout test failure/timeout by enabling "MockVideoPresentationMode"
+        and sending a request to enter/exit fullscreen after the current mode change is completed.
+
+        * media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline-expected.txt:
+        * media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html:
+        * platform/mac/TestExpectations:
+
 2021-01-12  Martin Robinson  <[email protected]>
 
         Clean up some mainframe scroll snap tests

Modified: trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline-expected.txt (271406 => 271407)


--- trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline-expected.txt	2021-01-12 17:30:52 UTC (rev 271406)
+++ trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline-expected.txt	2021-01-12 18:57:33 UTC (rev 271407)
@@ -7,11 +7,13 @@
 Media started playing, we pause it and enter fullscreen by clicking on the matching button.
 PASS shadowRoot.querySelector('.media-controls').classList.contains('inline') is true
 
+PASS internals.isChangingPresentationMode(media) became false
 Media entered fullscreen.
 PASS shadowRoot.querySelector('.media-controls').classList.contains('fullscreen') is true
 
 We exit fullscreen by clicking on the matching button.
 
+PASS internals.isChangingPresentationMode(media) became false
 Media exited fullscreen.
 PASS shadowRoot.querySelector('.media-controls').classList.contains('inline') is true
 PASS shadowRoot.querySelector('.start-button') is null

Modified: trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html (271406 => 271407)


--- trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html	2021-01-12 17:30:52 UTC (rev 271406)
+++ trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html	2021-01-12 18:57:33 UTC (rev 271407)
@@ -9,6 +9,9 @@
 
 description("Testing that entering fullscreen then going back into inline presents inline controls.");
 
+if (window.internals)
+    internals.setMockVideoPresentationModeEnabled(true);
+
 const media = document.querySelector("video");
 const shadowRoot = window.internals.shadowRoot(media);
 
@@ -18,12 +21,20 @@
     shouldBeTrue("shadowRoot.querySelector('.media-controls').classList.contains('inline')");
 
     media.pause();
-    window.requestAnimationFrame(() => toggleFullscreen());
+    window.requestAnimationFrame(() => clickFullscreenButton());
 });
 
 media.addEventListener("webkitfullscreenchange", () => {
     debug("");
 
+    if (window.internals)
+        shouldBecomeEqual("internals.isChangingPresentationMode(media)", "false", toggleFullscreen);
+    else
+        toggleFullscreen();
+});
+
+function toggleFullscreen()
+{
     if (media.webkitDisplayingFullscreen) {
         debug("Media entered fullscreen.");
         window.requestAnimationFrame(() => {
@@ -31,7 +42,7 @@
 
             debug("");
             debug("We exit fullscreen by clicking on the matching button.");
-            toggleFullscreen();
+            clickFullscreenButton();
         });
     } else {
         debug("Media exited fullscreen.");
@@ -44,9 +55,9 @@
             finishJSTest();
         });
     }
-});
+}
 
-function toggleFullscreen()
+function clickFullscreenButton()
 {
     const element = shadowRoot.querySelector("button.fullscreen");
     const bounds = element.getBoundingClientRect();

Modified: trunk/LayoutTests/platform/mac/TestExpectations (271406 => 271407)


--- trunk/LayoutTests/platform/mac/TestExpectations	2021-01-12 17:30:52 UTC (rev 271406)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2021-01-12 18:57:33 UTC (rev 271407)
@@ -1454,7 +1454,6 @@
 
 webkit.org/b/183490 media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html [ Failure ]
 webkit.org/b/183490 media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen.html [ Failure ]
-webkit.org/b/183490 media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html [ Failure ]
 webkit.org/b/183490 media/modern-media-controls/start-support/start-support-fullscreen.html [ Failure ]
 
 webkit.org/b/183764 fast/css/apple-system-control-colors.html [ Pass ]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to