blob: 601c60bcaf87ef370a819b380c5114143781b350 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
'use strict';
function createVideoFrame() {
const canvas = document.createElement('canvas');
return new VideoFrame(canvas, {timestamp: 0});
}
promise_test(async (t) => {
const frame = createVideoFrame();
const detector = new FaceDetector();
await promise_rejects_dom(t, 'NotSupportedError', detector.detect(frame));
}, 'FaceDetector.detect() rejects on a VideoFrame');
promise_test(async (t) => {
const frame = createVideoFrame();
const detector = new BarcodeDetector();
await promise_rejects_dom(t, 'NotSupportedError', detector.detect(frame));
}, 'BarcodeDetector.detect() rejects on a VideoFrame');
promise_test(async (t) => {
const frame = createVideoFrame();
const detector = new TextDetector();
await promise_rejects_dom(t, 'NotSupportedError', detector.detect(frame));
}, 'TextDetector.detect() rejects on a VideoFrame');
|