| <script src="/resources/testharness.js"></script> | |
| <script src="/resources/testharnessreport.js"></script> | |
| <script> | |
| function createVideoFrame () { | |
| new VideoFrame(new ArrayBuffer(2), { | |
| format: 'I420', | |
| codedWidth: 2, | |
| codedHeight: 2, | |
| timestamp: 0, | |
| visibleRect: { | |
| width: 1, | |
| height: 2 | |
| }, | |
| }); | |
| } | |
| test(() => { | |
| assert_throws_js(TypeError, () => createVideoFrame()); | |
| }, "VideoFrame constructor should throw type error with bad data"); | |
| </script> |