Title: [275328] trunk/LayoutTests
- Revision
- 275328
- Author
- peng.l...@apple.com
- Date
- 2021-03-31 17:47:35 -0700 (Wed, 31 Mar 2021)
Log Message
[ macOS wk2 ] media/pip-video-going-into-fullscreen.html is a flakey timeout
https://bugs.webkit.org/show_bug.cgi?id=223762
Reviewed by Eric Carlson.
Fix a flaky test related to video fullscreen by:
1) Wait for a video presentation mode change to complete before moving to the next step in the test.
2) Request the video to exit fullscreen before `endTest()` (to avoid interference with other tests).
* media/pip-video-going-into-fullscreen-expected.txt:
* media/pip-video-going-into-fullscreen.html:
* platform/mac-wk2/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (275327 => 275328)
--- trunk/LayoutTests/ChangeLog 2021-04-01 00:39:46 UTC (rev 275327)
+++ trunk/LayoutTests/ChangeLog 2021-04-01 00:47:35 UTC (rev 275328)
@@ -1,3 +1,18 @@
+2021-03-31 Peng Liu <peng.l...@apple.com>
+
+ [ macOS wk2 ] media/pip-video-going-into-fullscreen.html is a flakey timeout
+ https://bugs.webkit.org/show_bug.cgi?id=223762
+
+ Reviewed by Eric Carlson.
+
+ Fix a flaky test related to video fullscreen by:
+ 1) Wait for a video presentation mode change to complete before moving to the next step in the test.
+ 2) Request the video to exit fullscreen before `endTest()` (to avoid interference with other tests).
+
+ * media/pip-video-going-into-fullscreen-expected.txt:
+ * media/pip-video-going-into-fullscreen.html:
+ * platform/mac-wk2/TestExpectations:
+
2021-03-31 Cameron McCormack <hey...@apple.com>
Avoid creating any complex text runs when font-size is zero.
Modified: trunk/LayoutTests/media/pip-video-going-into-fullscreen-expected.txt (275327 => 275328)
--- trunk/LayoutTests/media/pip-video-going-into-fullscreen-expected.txt 2021-04-01 00:39:46 UTC (rev 275327)
+++ trunk/LayoutTests/media/pip-video-going-into-fullscreen-expected.txt 2021-04-01 00:47:35 UTC (rev 275328)
@@ -1,9 +1,14 @@
Tests pip video going into fullscreen should exit pip
Going into Picture-in-Picture
+EXPECTED (internals.isChangingPresentationMode(video) == 'false') OK
EXPECTED (video.webkitPresentationMode == 'picture-in-picture') OK
Going into Full Screen from Picture-in-Picture
+EXPECTED (internals.isChangingPresentationMode(video) == 'false') OK
+EXPECTED (internals.isChangingPresentationMode(video) == 'false') OK
EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLVideoElement]') OK
EXPECTED (video.webkitPresentationMode == 'fullscreen') OK
+EXPECTED (internals.isChangingPresentationMode(video) == 'false') OK
+Exited Full Screen
END OF TEST
Modified: trunk/LayoutTests/media/pip-video-going-into-fullscreen.html (275327 => 275328)
--- trunk/LayoutTests/media/pip-video-going-into-fullscreen.html 2021-04-01 00:39:46 UTC (rev 275327)
+++ trunk/LayoutTests/media/pip-video-going-into-fullscreen.html 2021-04-01 00:47:35 UTC (rev 275328)
@@ -29,29 +29,38 @@
consoleWrite("Going into Picture-in-Picture");
video.addEventListener('webkitpresentationmodechanged', onfirstpresentationmodechanged);
- runWithKeyDown(function(){ video.webkitSetPresentationMode('picture-in-picture'); });
+ runWithKeyDown(function() { video.webkitSetPresentationMode('picture-in-picture'); });
}
- function onfirstpresentationmodechanged()
+ async function onfirstpresentationmodechanged()
{
+ if (window.internals)
+ await testExpectedEventually("internals.isChangingPresentationMode(video)", false, "==", 2000);
+
testExpected("video.webkitPresentationMode", "picture-in-picture");
video.removeEventListener('webkitpresentationmodechanged', onfirstpresentationmodechanged);
consoleWrite("Going into Full Screen from Picture-in-Picture");
- video.addEventListener('webkitfullscreenchange', onfullscreenchange);
+ video.addEventListener('webkitfullscreenchange', onbeginfullscreen, { once: true });
video.addEventListener('webkitpresentationmodechanged', onsecondpresentationmodechanged);
- runWithKeyDown(function(){ video.webkitRequestFullscreen(); });
+ runWithKeyDown(function() { video.webkitRequestFullscreen(); });
}
- function onfullscreenchange()
+ async function onbeginfullscreen()
{
+ if (window.internals)
+ await testExpectedEventually("internals.isChangingPresentationMode(video)", false, "==", 2000);
+
enteredFullscreen = true;
if (exitedPIP)
checkFinalState();
}
- function onsecondpresentationmodechanged()
+ async function onsecondpresentationmodechanged()
{
+ if (window.internals)
+ await testExpectedEventually("internals.isChangingPresentationMode(video)", false, "==", 2000);
+
// We only expect one presentation mode change - from picture-in-picture to fullscreen.
if (exitedPIP)
failTest("Presentation mode changes more than once going into fullscreen from picture-in-picture.");
@@ -65,9 +74,18 @@
{
testExpected("document.webkitCurrentFullScreenElement", video);
testExpected("video.webkitPresentationMode", "fullscreen");
+ video.addEventListener('webkitfullscreenchange', onendfullscreen);
+ runWithKeyDown(function() { document.webkitExitFullscreen(); });
+ }
+
+ async function onendfullscreen()
+ {
+ if (window.internals)
+ await testExpectedEventually("internals.isChangingPresentationMode(video)", false, "==", 2000);
+
+ consoleWrite("Exited Full Screen");
endTest();
}
-
</script>
</head>
<body _onload_="init()">
Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (275327 => 275328)
--- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2021-04-01 00:39:46 UTC (rev 275327)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2021-04-01 00:47:35 UTC (rev 275328)
@@ -1368,8 +1368,6 @@
webkit.org/b/223750 [ Debug ] security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html [ Pass Crash ]
-webkit.org/b/223762 media/pip-video-going-into-fullscreen.html [ Pass Timeout ]
-
webkit.org/b/223900 [ Debug ] compositing/video/video-update-rendering.html [ Pass Failure ]
-webkit.org/b/223969 imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/processing-after-resume.https.html [ Pass Failure ]
\ No newline at end of file
+webkit.org/b/223969 imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/processing-after-resume.https.html [ Pass Failure ]
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes