Title: [271181] trunk/LayoutTests
- Revision
- 271181
- Author
- [email protected]
- Date
- 2021-01-05 16:33:17 -0800 (Tue, 05 Jan 2021)
Log Message
media-source-webm.html: Handle frame size in HAVE_METADATA
https://bugs.webkit.org/show_bug.cgi?id=220046
Reviewed by Daniel Bates.
A follow-up patch to fix a failure on Big Sur. A 'resize' event can be fired before or
after the 'update' event. The test needs to support both cases.
* media/media-source/media-source-webm-expected.txt:
* media/media-source/media-source-webm.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (271180 => 271181)
--- trunk/LayoutTests/ChangeLog 2021-01-06 00:22:12 UTC (rev 271180)
+++ trunk/LayoutTests/ChangeLog 2021-01-06 00:33:17 UTC (rev 271181)
@@ -1,5 +1,18 @@
2021-01-05 Peng Liu <[email protected]>
+ media-source-webm.html: Handle frame size in HAVE_METADATA
+ https://bugs.webkit.org/show_bug.cgi?id=220046
+
+ Reviewed by Daniel Bates.
+
+ A follow-up patch to fix a failure on Big Sur. A 'resize' event can be fired before or
+ after the 'update' event. The test needs to support both cases.
+
+ * media/media-source/media-source-webm-expected.txt:
+ * media/media-source/media-source-webm.html:
+
+2021-01-05 Peng Liu <[email protected]>
+
[Media in GPU Process][MSE] SourceBuffer fires update and updateend events before the coded frames are removed
https://bugs.webkit.org/show_bug.cgi?id=220334
Modified: trunk/LayoutTests/media/media-source/media-source-webm-expected.txt (271180 => 271181)
--- trunk/LayoutTests/media/media-source/media-source-webm-expected.txt 2021-01-06 00:22:12 UTC (rev 271180)
+++ trunk/LayoutTests/media/media-source/media-source-webm-expected.txt 2021-01-06 00:33:17 UTC (rev 271181)
@@ -5,11 +5,11 @@
RUN(source.duration = loader.duration())
RUN(sourceBuffer = source.addSourceBuffer(loader.type()))
RUN(sourceBuffer.appendBuffer(loader.initSegment()))
-EVENT(resize)
-EXPECTED (video.videoWidth == '320') OK
-EXPECTED (video.videoHeight == '240') OK
EVENT(update)
Append a media segment.
RUN(sourceBuffer.appendBuffer(loader.mediaSegment(0)))
+EXPECTED (resizeEventFired == 'true') OK
+EXPECTED (videoWidth == '320') OK
+EXPECTED (videoHeight == '240') OK
END OF TEST
Modified: trunk/LayoutTests/media/media-source/media-source-webm.html (271180 => 271181)
--- trunk/LayoutTests/media/media-source/media-source-webm.html 2021-01-06 00:22:12 UTC (rev 271180)
+++ trunk/LayoutTests/media/media-source/media-source-webm.html 2021-01-06 00:33:17 UTC (rev 271181)
@@ -8,6 +8,9 @@
var loader;
var source;
var sourceBuffer;
+ var resizeEventFired = false;
+ var videoWidth = 0;
+ var videoHeight = 0;
function loaderPromise(loader) {
return new Promise((resolve, reject) => {
@@ -22,9 +25,9 @@
// First resize can be 0x0
if (video.videoWidth == 0 && video.videoHeight == 0)
return;
- consoleWrite(`EVENT(${event.type})`);
- testExpected('video.videoWidth', width);
- testExpected('video.videoHeight', height);
+ resizeEventFired = true;
+ videoWidth = video.videoWidth;
+ videoHeight = video.videoHeight;
resolve();
});
});
@@ -43,7 +46,7 @@
run('source.duration = loader.duration()');
run('sourceBuffer = source.addSourceBuffer(loader.type())');
- const resized = resizePromise(video, 320, 240);
+ const resized = resizePromise(video);
run('sourceBuffer.appendBuffer(loader.initSegment())');
await waitFor(sourceBuffer, 'update');
@@ -52,6 +55,9 @@
run('sourceBuffer.appendBuffer(loader.mediaSegment(0))');
await resized;
+ testExpected('resizeEventFired', true);
+ testExpected('videoWidth', 320);
+ testExpected('videoHeight', 240);
endTest();
} catch (e) {
failTest(`Caught exception: "${e}"`);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes