Title: [262514] trunk/LayoutTests
- Revision
- 262514
- Author
- [email protected]
- Date
- 2020-06-03 13:57:44 -0700 (Wed, 03 Jun 2020)
Log Message
REGRESSION: (r262456): [ Mac ] media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html is timing out.
https://bugs.webkit.org/show_bug.cgi?id=212694
Reviewed by Jer Noble.
Enable the mock video presentation mode of the WebKitTestRunner in the test,
and only request a video element to change its video presentation mode after
the previous change is completed.
* media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline-expected.txt:
* media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html:
* platform/mac/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (262513 => 262514)
--- trunk/LayoutTests/ChangeLog 2020-06-03 20:23:30 UTC (rev 262513)
+++ trunk/LayoutTests/ChangeLog 2020-06-03 20:57:44 UTC (rev 262514)
@@ -1,3 +1,18 @@
+2020-06-03 Peng Liu <[email protected]>
+
+ REGRESSION: (r262456): [ Mac ] media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html is timing out.
+ https://bugs.webkit.org/show_bug.cgi?id=212694
+
+ Reviewed by Jer Noble.
+
+ Enable the mock video presentation mode of the WebKitTestRunner in the test,
+ and only request a video element to change its video presentation mode after
+ the previous change is completed.
+
+ * media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline-expected.txt:
+ * media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html:
+ * platform/mac/TestExpectations:
+
2020-06-03 Jacob Uphoff <[email protected]>
REGRESSION: [macOS WK2] Layout Test fast/mediastream/device-cha nge-event-2.html is a flaky timeout
Modified: trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline-expected.txt (262513 => 262514)
--- trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline-expected.txt 2020-06-03 20:23:30 UTC (rev 262513)
+++ trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline-expected.txt 2020-06-03 20:57:44 UTC (rev 262514)
@@ -4,19 +4,22 @@
+PASS shadowRoot.querySelector('.media-controls').classList.contains('inline') is true
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
Media received a webkitpresentationmodechanged event, media.webkitPresentationMode = fullscreen.
+PASS media.webkitDisplayingFullscreen became true
PASS shadowRoot.querySelector('.media-controls').classList.contains('fullscreen') is true
We enter picture-in-picture by clicking on the matching button.
Media received a webkitpresentationmodechanged event, media.webkitPresentationMode = picture-in-picture.
+PASS media.webkitDisplayingFullscreen became true
We exit picture-in-picture.
Media received a webkitpresentationmodechanged event, media.webkitPresentationMode = inline.
+PASS media.webkitDisplayingFullscreen became false
PASS shadowRoot.querySelector('.media-controls').classList.contains('inline') is true
PASS successfullyParsed is true
Modified: trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html (262513 => 262514)
--- trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html 2020-06-03 20:23:30 UTC (rev 262513)
+++ trunk/LayoutTests/media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html 2020-06-03 20:57:44 UTC (rev 262514)
@@ -9,8 +9,10 @@
description("Testing that entering fullscreen, then going into picture-in-picture and then going back to inline presents inline controls.");
-if (window.internals)
- window.internals.settings.setAllowsPictureInPictureMediaPlayback(true);
+if (window.internals) {
+ internals.settings.setAllowsPictureInPictureMediaPlayback(true);
+ internals.setMockVideoPresentationModeEnabled(true);
+}
const media = document.querySelector("video");
const shadowRoot = window.internals.shadowRoot(media);
@@ -17,8 +19,8 @@
media.addEventListener("play", () => {
debug("");
+ shouldBeTrue("shadowRoot.querySelector('.media-controls').classList.contains('inline')");
debug("Media started playing, we pause it and enter fullscreen by clicking on the matching button.");
- shouldBeTrue("shadowRoot.querySelector('.media-controls').classList.contains('inline')");
media.pause();
window.requestAnimationFrame(() => clickOnElement(shadowRoot.querySelector("button.fullscreen")));
@@ -29,36 +31,41 @@
if (previousPresentationMode === media.webkitPresentationMode)
return;
- previousPresentationMode = media.webkitPresentationMode;
-
debug("");
debug(`Media received a webkitpresentationmodechanged event, media.webkitPresentationMode = ${media.webkitPresentationMode}.`);
- switch (media.webkitPresentationMode) {
- case "fullscreen":
- window.requestAnimationFrame(() => {
- shouldBeTrue("shadowRoot.querySelector('.media-controls').classList.contains('fullscreen')");
+ let displayingFullscreen = "true";
+ if (media.webkitPresentationMode == "inline")
+ displayingFullscreen = "false";
+ shouldBecomeEqual("media.webkitDisplayingFullscreen", displayingFullscreen, () => {
+ previousPresentationMode = media.webkitPresentationMode;
+ switch (media.webkitPresentationMode) {
+ case "fullscreen":
+ window.requestAnimationFrame(() => {
+ shouldBeTrue("shadowRoot.querySelector('.media-controls').classList.contains('fullscreen')");
+
+ debug("");
+ debug("We enter picture-in-picture by clicking on the matching button.");
+ clickOnElement(shadowRoot.querySelector("button.pip"));
+ });
+ break;
+ case "picture-in-picture":
debug("");
- debug("We enter picture-in-picture by clicking on the matching button.");
- clickOnElement(shadowRoot.querySelector("button.pip"));
- });
- break;
- case "picture-in-picture":
- debug("");
- debug("We exit picture-in-picture.");
- window.setTimeout(() => media.webkitSetPresentationMode("inline"));
- break;
- case "inline":
- window.requestAnimationFrame(() => {
- shouldBeTrue("shadowRoot.querySelector('.media-controls').classList.contains('inline')");
+ debug("We exit picture-in-picture.");
+ window.setTimeout(() => media.webkitSetPresentationMode("inline"));
+ break;
+ case "inline":
+ window.requestAnimationFrame(() => {
+ shouldBeTrue("shadowRoot.querySelector('.media-controls').classList.contains('inline')");
- debug("");
- media.remove();
- finishJSTest();
- });
- break;
- }
+ debug("");
+ media.remove();
+ finishJSTest();
+ });
+ break;
+ }
+ });
});
function clickOnElement(element)
Modified: trunk/LayoutTests/platform/mac/TestExpectations (262513 => 262514)
--- trunk/LayoutTests/platform/mac/TestExpectations 2020-06-03 20:23:30 UTC (rev 262513)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2020-06-03 20:57:44 UTC (rev 262514)
@@ -1966,5 +1966,3 @@
# This test requires an update to system decoders
webkit.org/b/212565 [ Catalina Mojave ] imported/w3c/web-platform-tests/encoding/single-byte-decoder.html [ Failure ]
-
-webkit.org/b/212694 media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html [ Pass Timeout ]
\ No newline at end of file
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes