Diff
Modified: trunk/LayoutTests/ChangeLog (274280 => 274281)
--- trunk/LayoutTests/ChangeLog 2021-03-11 17:03:41 UTC (rev 274280)
+++ trunk/LayoutTests/ChangeLog 2021-03-11 17:12:14 UTC (rev 274281)
@@ -1,3 +1,22 @@
+2021-03-11 Peng Liu <peng.l...@apple.com>
+
+ [GPUP] Some modern-media-controls tests are flaky when media in GPU Process is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=221685
+
+ Reviewed by Eric Carlson.
+
+ Fix two flaky tests related to video fullscreen by:
+ 1) Enable "MockVideoPresentationMode".
+ 2) Wait for a video presentation mode change to complete before moving to the next step in the test.
+ 3) Request the video to exit fullscreen before finish the test (to avoid interference with other tests).
+
+ * media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video-expected.txt:
+ * media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html:
+ * media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen-expected.txt:
+ * media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen.html:
+ * platform/mac/TestExpectations:
+ * platform/wk2/TestExpectations:
+
2021-03-11 Zalan Bujtas <za...@apple.com>
Cleanup references to float and out-of-flow renderers before destroying them.
Modified: trunk/LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video-expected.txt (274280 => 274281)
--- trunk/LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video-expected.txt 2021-03-11 17:03:41 UTC (rev 274280)
+++ trunk/LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video-expected.txt 2021-03-11 17:12:14 UTC (rev 274281)
@@ -3,7 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS media.webkitDisplayingFullscreen is true
+PASS internals.isChangingPresentationMode(media) became false
PASS mediaController.controls.visible is true
PASS successfullyParsed is true
Modified: trunk/LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html (274280 => 274281)
--- trunk/LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html 2021-03-11 17:03:41 UTC (rev 274280)
+++ trunk/LayoutTests/media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html 2021-03-11 17:12:14 UTC (rev 274281)
@@ -10,6 +10,13 @@
description("Testing that control are shown in fullscreen when the controls attribute is not present.");
+if (!window.internals) {
+ debug("window.internals is not defined");
+ finishJSTest();
+}
+
+internals.setMockVideoPresentationModeEnabled(true);
+
const container = document.querySelector("div#host");
const media = document.querySelector("video");
const mediaController = createControls(container, media, null);
@@ -16,12 +23,17 @@
media.addEventListener("play", () => {
media.addEventListener("webkitfullscreenchange", () => {
- shouldBeTrue("media.webkitDisplayingFullscreen");
- shouldBeTrue("mediaController.controls.visible");
- button.remove();
- container.remove();
- media.remove();
- finishJSTest();
+ if (!media.webkitDisplayingFullscreen) {
+ media.remove();
+ finishJSTest();
+ }
+
+ shouldBecomeEqual("internals.isChangingPresentationMode(media)", "false", () => {
+ shouldBeTrue("mediaController.controls.visible");
+ button.remove();
+ container.remove();
+ media.webkitExitFullscreen();
+ });
});
const button = document.body.appendChild(document.createElement("div"));
Modified: trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen-expected.txt (274280 => 274281)
--- trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen-expected.txt 2021-03-11 17:03:41 UTC (rev 274280)
+++ trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen-expected.txt 2021-03-11 17:12:14 UTC (rev 274281)
@@ -6,6 +6,7 @@
We should not fade the controls in when showing them inline the first time
PASS mediaControls.classList.contains('fade-in') is false
Clicking on the fullscreen button
+PASS internals.isChangingPresentationMode(media) became false
Obtained a webkitfullscreenchange event
PASS media.webkitDisplayingFullscreen is true
We should fade the controls in when showing them fullscreen
Modified: trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen.html (274280 => 274281)
--- trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen.html 2021-03-11 17:03:41 UTC (rev 274280)
+++ trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen.html 2021-03-11 17:12:14 UTC (rev 274281)
@@ -8,6 +8,13 @@
description("Fading in the controls when entering fullscreen.");
+if (!window.internals) {
+ debug("window.internals is not defined");
+ finishJSTest();
+}
+
+internals.setMockVideoPresentationModeEnabled(true);
+
const media = document.querySelector("video");
const shadowRoot = window.internals.shadowRoot(media);
let mediaControls = shadowRoot.lastElementChild.lastElementChild;
@@ -21,15 +28,21 @@
clickOnFullscreenButton();
media.addEventListener("webkitfullscreenchange", () => {
- mediaControls = shadowRoot.lastElementChild.lastElementChild;
- debug("Obtained a webkitfullscreenchange event");
- shouldBeTrue("media.webkitDisplayingFullscreen");
- debug("We should fade the controls in when showing them fullscreen");
- shouldBeTrue("mediaControls.classList.contains('fade-in')");
+ if (!media.webkitDisplayingFullscreen) {
+ media.remove();
+ finishJSTest();
+ }
- debug("");
- media.remove();
- finishJSTest();
+ shouldBecomeEqual("internals.isChangingPresentationMode(media)", "false", () => {
+ mediaControls = shadowRoot.lastElementChild.lastElementChild;
+ debug("Obtained a webkitfullscreenchange event");
+ shouldBeTrue("media.webkitDisplayingFullscreen");
+ debug("We should fade the controls in when showing them fullscreen");
+ shouldBeTrue("mediaControls.classList.contains('fade-in')");
+
+ debug("");
+ media.webkitExitFullscreen();
+ });
});
});
});
Modified: trunk/LayoutTests/platform/mac/TestExpectations (274280 => 274281)
--- trunk/LayoutTests/platform/mac/TestExpectations 2021-03-11 17:03:41 UTC (rev 274280)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2021-03-11 17:12:14 UTC (rev 274281)
@@ -1458,8 +1458,6 @@
webkit.org/b/173946 [ Debug ] media/modern-media-controls/fullscreen-support/fullscreen-support-press.html [ Pass Failure ]
-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/start-support/start-support-fullscreen.html [ Failure ]
webkit.org/b/183764 fast/css/apple-system-control-colors.html [ Pass ]
Modified: trunk/LayoutTests/platform/wk2/TestExpectations (274280 => 274281)
--- trunk/LayoutTests/platform/wk2/TestExpectations 2021-03-11 17:03:41 UTC (rev 274280)
+++ trunk/LayoutTests/platform/wk2/TestExpectations 2021-03-11 17:12:14 UTC (rev 274281)
@@ -217,11 +217,8 @@
http/tests/media/video-play-stall.html [ Failure ]
# webkit.org/b/221685
-media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html [ Timeout Failure Pass ]
-media/modern-media-controls/fullscreen-support/fullscreen-support-press.html [ Timeout Pass ]
media/modern-media-controls/media-controller/media-controller-auto-hide.html [ Crash Pass ]
media/modern-media-controls/media-controller/media-controller-click-on-video-background-should-pause-fullscreen.html [ Timeout Pass ]
-media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen.html [ Failure Timeout ]
media/modern-media-controls/media-controller/media-controller-fullscreen-change.html [ Failure Pass ]
media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html [ Timeout Pass ]
media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html [ Timeout Pass ]
@@ -229,7 +226,6 @@
media/modern-media-controls/placard-support/placard-support-airplay-fullscreen.html [ Timeout Pass ]
media/modern-media-controls/scrubber-support/scrubber-support-drag.html [ Timeout Pass ]
media/modern-media-controls/seek-backward-support/seek-backward-support.html [ Timeout Pass ]
-http/tests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-live-broadcast.html [ Timeout ]
# webkit.org/b/221693
media/encrypted-media/clearKey/clearKey-session-life-cycle.html [ Failure Crash ]