Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 3 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /shape-detection/detection-Blob.https.window.html - WPT Dashboard Interop Dashboard
'use strict';
promise_test(async (t) => {
const blob = new Blob(['not really a png'], {type: 'image/png'});
const detector = new FaceDetector();
await promise_rejects_dom(t, 'NotSupportedError', detector.detect(blob));
}, 'FaceDetector.detect() rejects on a Blob');
promise_test(async (t) => {
const blob = new Blob(['not really a png'], {type: 'image/png'});
const detector = new BarcodeDetector();
await promise_rejects_dom(t, 'NotSupportedError', detector.detect(blob));
}, 'BarcodeDetector.detect() rejects on a Blob');
promise_test(async (t) => {
const blob = new Blob(['not really a png'], {type: 'image/png'});
const detector = new TextDetector();
await promise_rejects_dom(t, 'NotSupportedError', detector.detect(blob));
}, 'TextDetector.detect() rejects on a Blob');