mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision b'4435c35d9085ed2be61e64d0093b8e1b0e7a877b'
This commit is contained in:
parent
901b76297d
commit
4031d79cea
383 changed files with 8858 additions and 2734 deletions
|
@ -0,0 +1,53 @@
|
|||
// META: global=window,dedicatedworker
|
||||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
// META: script=./utils.js
|
||||
// META: timeout=long
|
||||
|
||||
'use strict';
|
||||
|
||||
var defaultCodecInit = {
|
||||
output: function() {
|
||||
assert_unreached("unexpected output");
|
||||
},
|
||||
error: function() {
|
||||
assert_unreached("unexpected error");
|
||||
},
|
||||
}
|
||||
|
||||
var defaultAudioChunkInit = {
|
||||
type: 'key',
|
||||
timestamp: 1234,
|
||||
duration: 9876,
|
||||
data: new Uint8Array([5, 6, 7, 8])
|
||||
};
|
||||
|
||||
var defaultVideoChunkInit = {
|
||||
type: 'key',
|
||||
timestamp: 1234,
|
||||
duration: 5678,
|
||||
data: new Uint8Array([9, 10, 11, 12])
|
||||
};
|
||||
|
||||
idl_test(
|
||||
['webcodecs'],
|
||||
['webidl'],
|
||||
async idlArray => {
|
||||
self.imageBody = await fetch('four-colors.png').then(response => response.arrayBuffer());
|
||||
|
||||
idlArray.add_objects({
|
||||
AudioDecoder: [`new AudioDecoder(defaultCodecInit)`],
|
||||
VideoDecoder: [`new VideoDecoder(defaultCodecInit)`],
|
||||
AudioEncoder: [`new AudioEncoder(defaultCodecInit)`],
|
||||
VideoEncoder: [`new VideoEncoder(defaultCodecInit)`],
|
||||
EncodedAudioChunk: [`new EncodedAudioChunk(defaultAudioChunkInit)`],
|
||||
EncodedVideoChunk: [`new EncodedVideoChunk(defaultVideoChunkInit)`],
|
||||
AudioData: [`make_audio_data(1234, 2, 8000, 100)`],
|
||||
VideoFrame: [`new VideoFrame(makeImageBitmap(32,16), {timestamp:100, duration:33})`],
|
||||
VideoColorSpace: [`new VideoColorSpace()`],
|
||||
ImageDecoder: [`new ImageDecoder({data: self.imageBody, type: 'image/png'})`],
|
||||
ImageTrackList: [`new ImageDecoder({data: self.imageBody, type: 'image/png'}).tracks`],
|
||||
ImageTrack: [`new ImageDecoder({data: self.imageBody, type: 'image/png'}).tracks[0]`],
|
||||
});
|
||||
}
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue