⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 271181 in webkit


Ignore:
Timestamp:
Jan 5, 2021, 4:33:17 PM (6 years ago)
Author:
Peng Liu
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:
Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r271178 r271181  
     12021-01-05  Peng Liu  <peng.liu6@apple.com>
     2
     3        media-source-webm.html: Handle frame size in HAVE_METADATA
     4        https://bugs.webkit.org/show_bug.cgi?id=220046
     5
     6        Reviewed by Daniel Bates.
     7
     8        A follow-up patch to fix a failure on Big Sur. A 'resize' event can be fired before or
     9        after the 'update' event. The test needs to support both cases.
     10
     11        * media/media-source/media-source-webm-expected.txt:
     12        * media/media-source/media-source-webm.html:
     13
    1142021-01-05  Peng Liu  <peng.liu6@apple.com>
    215
  • trunk/LayoutTests/media/media-source/media-source-webm-expected.txt

    r271020 r271181  
    66RUN(sourceBuffer = source.addSourceBuffer(loader.type()))
    77RUN(sourceBuffer.appendBuffer(loader.initSegment()))
    8 EVENT(resize)
    9 EXPECTED (video.videoWidth == '320') OK
    10 EXPECTED (video.videoHeight == '240') OK
    118EVENT(update)
    129Append a media segment.
    1310RUN(sourceBuffer.appendBuffer(loader.mediaSegment(0)))
     11EXPECTED (resizeEventFired == 'true') OK
     12EXPECTED (videoWidth == '320') OK
     13EXPECTED (videoHeight == '240') OK
    1414END OF TEST
    1515
  • trunk/LayoutTests/media/media-source/media-source-webm.html

    r271020 r271181  
    99    var source;
    1010    var sourceBuffer;
     11    var resizeEventFired = false;
     12    var videoWidth = 0;
     13    var videoHeight = 0;
    1114
    1215    function loaderPromise(loader) {
     
    2326                if (video.videoWidth == 0 && video.videoHeight == 0)
    2427                    return;
    25                 consoleWrite(`EVENT(${event.type})`);
    26                 testExpected('video.videoWidth', width);
    27                 testExpected('video.videoHeight', height);
     28                resizeEventFired = true;
     29                videoWidth = video.videoWidth;
     30                videoHeight = video.videoHeight;
    2831                resolve();
    2932            });
     
    4447            run('source.duration = loader.duration()');
    4548            run('sourceBuffer = source.addSourceBuffer(loader.type())');
    46             const resized = resizePromise(video, 320, 240);
     49            const resized = resizePromise(video);
    4750            run('sourceBuffer.appendBuffer(loader.initSegment())');
    4851
     
    5356
    5457            await resized;
     58            testExpected('resizeEventFired', true);
     59            testExpected('videoWidth', 320);
     60            testExpected('videoHeight', 240);
    5561            endTest();
    5662        } catch (e) {
Note: See TracChangeset for help on using the changeset viewer.