Title: [265273] trunk/LayoutTests
- Revision
- 265273
- Author
- jer.no...@apple.com
- Date
- 2020-08-04 18:41:55 -0700 (Tue, 04 Aug 2020)
Log Message
REGRESSION(r265167): media/media-source/media-source-webm.html failing
https://bugs.webkit.org/show_bug.cgi?id=215142
<rdar://problem/66487888>
Reviewed by Eric Carlson.
Once we started checking the "codecs=" parameter of the MIME type in MediaSource.isTypeSupported(),
the media-source-webm.html test started failing, as the codecs string didn't include some mandatory
entries. Also re-wrote the test to use a single try/catch block to catch errors without timing out.
* media/media-source/content/test-vp9-manifest.json:
* media/media-source/media-source-webm.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (265272 => 265273)
--- trunk/LayoutTests/ChangeLog 2020-08-05 01:32:52 UTC (rev 265272)
+++ trunk/LayoutTests/ChangeLog 2020-08-05 01:41:55 UTC (rev 265273)
@@ -1,3 +1,18 @@
+2020-08-04 Jer Noble <jer.no...@apple.com>
+
+ REGRESSION(r265167): media/media-source/media-source-webm.html failing
+ https://bugs.webkit.org/show_bug.cgi?id=215142
+ <rdar://problem/66487888>
+
+ Reviewed by Eric Carlson.
+
+ Once we started checking the "codecs=" parameter of the MIME type in MediaSource.isTypeSupported(),
+ the media-source-webm.html test started failing, as the codecs string didn't include some mandatory
+ entries. Also re-wrote the test to use a single try/catch block to catch errors without timing out.
+
+ * media/media-source/content/test-vp9-manifest.json:
+ * media/media-source/media-source-webm.html:
+
2020-08-04 Chris Fleizach <cfleiz...@apple.com>
AX: VoiceOver needs access to font styling at insertion point
Modified: trunk/LayoutTests/media/media-source/content/test-vp9-manifest.json (265272 => 265273)
--- trunk/LayoutTests/media/media-source/content/test-vp9-manifest.json 2020-08-05 01:32:52 UTC (rev 265272)
+++ trunk/LayoutTests/media/media-source/content/test-vp9-manifest.json 2020-08-05 01:41:55 UTC (rev 265273)
@@ -1,6 +1,6 @@
{
"url": "content/test-vp9.webm",
- "type": "video/webm; codecs=\"vp09.00.10.08.01\"",
+ "type": "video/webm; codecs=\"vp09.00.10.08\"",
"init": { "offset": 0, "size": 629 },
"duration": 2,
"media": [
Modified: trunk/LayoutTests/media/media-source/media-source-webm.html (265272 => 265273)
--- trunk/LayoutTests/media/media-source/media-source-webm.html 2020-08-05 01:32:52 UTC (rev 265272)
+++ trunk/LayoutTests/media/media-source/media-source-webm.html 2020-08-05 01:41:55 UTC (rev 265273)
@@ -9,50 +9,56 @@
var source;
var sourceBuffer;
- function runTest() {
- findMediaElement();
-
- loader = new MediaSourceLoader('content/test-vp9-manifest.json');
- loader._onload_ = mediaDataLoaded;
- loader._onerror_ = mediaDataLoadingFailed;
+ function loaderPromise(loader) {
+ return new Promise((resolve, reject) => {
+ loader._onload_ = resolve;
+ loader._onerror_ = reject;
+ });
}
- function mediaDataLoadingFailed() {
- failTest('Media data loading failed');
+ function resizePromise(video, width, height) {
+ return new Promise(resolve => {
+ video.addEventListener('resize', event => {
+ // 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);
+ resolve();
+ });
+ });
}
- function mediaDataLoaded() {
- source = new MediaSource();
- waitForEvent('sourceopen', sourceOpen, false, false, source);
- waitForEventAndFail('error');
- run('video.src = ""
- }
+ window.addEventListener('load', async event => {
+ try {
+ findMediaElement();
+ loader = new MediaSourceLoader('content/test-vp9-manifest.json');
+ await loaderPromise(loader);
- function sourceOpen() {
- run('source.duration = loader.duration()');
- run('sourceBuffer = source.addSourceBuffer(loader.type())');
- waitForEventOn(sourceBuffer, 'update', sourceInitialized, false, true);
- waitForEventOnce('resize', resize);
- run('sourceBuffer.appendBuffer(loader.initSegment())');
- }
+ source = new MediaSource();
+ run('video.src = ""
+ await waitFor(source, 'sourceopen');
+ waitForEventAndFail('error');
- function sourceInitialized() {
- waitForEventOnce('resize', resize);
- consoleWrite('Append a media segment.')
- run('sourceBuffer.appendBuffer(loader.mediaSegment(0))');
- }
+ run('source.duration = loader.duration()');
+ run('sourceBuffer = source.addSourceBuffer(loader.type())');
+ run('sourceBuffer.appendBuffer(loader.initSegment())');
- function resize() {
- // First resize can be 0x0 (Mac) or 640x480 (GTK+)
- if (video.videoWidth > 0 && video.videoHeight > 0) {
- testExpected('video.videoWidth', 320);
- testExpected('video.videoHeight', 240);
+ await waitFor(sourceBuffer, 'update');
+
+ consoleWrite('Append a media segment.')
+ run('sourceBuffer.appendBuffer(loader.mediaSegment(0))');
+
+ await resizePromise(video, 320, 240);
endTest();
+ } catch (e) {
+ failTest(`Caught exception: "${e}"`);
}
- }
+ });
</script>
</head>
-<body _onload_="runTest()">
+<body>
<div>
This tests the ability of the SourceBuffer to reset the parser after an abort(). A SourceBuffer in this state should be able to accept
a new initialization segment or a new media segment.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes