mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
Update web-platform-tests to revision b'a6e9e432ca1b26cdf30b08f9de038b85a215361d'
This commit is contained in:
parent
3cd030566e
commit
1c047e9418
139 changed files with 2729 additions and 938 deletions
|
@ -94,6 +94,30 @@ test(t => {
|
|||
})
|
||||
}, 'Test constructing w/ unusable image argument throws: HAVE_NOTHING <video>.');
|
||||
|
||||
promise_test(async t => {
|
||||
// Test only valid for Window contexts.
|
||||
if (!('document' in self))
|
||||
return;
|
||||
|
||||
let video = document.createElement('video');
|
||||
video.src = 'av1.mp4';
|
||||
video.autoplay = true;
|
||||
video.controls = false;
|
||||
video.muted = false;
|
||||
document.body.appendChild(video);
|
||||
|
||||
const loadVideo = new Promise((resolve) => {
|
||||
video.onloadeddata = () => resolve();
|
||||
});
|
||||
await loadVideo;
|
||||
|
||||
let frame = new VideoFrame(video, {timestamp: 10});
|
||||
assert_equals(frame.codedWidth, 320, 'codedWidth');
|
||||
assert_equals(frame.codedHeight, 240, 'codedHeight');
|
||||
assert_equals(frame.timestamp, 10, 'timestamp');
|
||||
frame.close();
|
||||
}, 'Test we can construct a VideoFrame from a <video>.');
|
||||
|
||||
test(t => {
|
||||
let canvas = new OffscreenCanvas(0, 0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue