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-SVGImageElement.https.window.html - WPT Dashboard Interop Dashboard
'use strict';
promise_test(async (t) => {
const detector = new FaceDetector();
await promise_rejects_dom(t, 'NotSupportedError', detector.detect(image));
}, 'FaceDetector.detect() rejects on an SVGImageElement');
promise_test(async (t) => {
const detector = new BarcodeDetector();
await promise_rejects_dom(t, 'NotSupportedError', detector.detect(image));
}, 'BarcodeDetector.detect() rejects on an SVGImageElement');
promise_test(async (t) => {
const detector = new TextDetector();
await promise_rejects_dom(t, 'NotSupportedError', detector.detect(image));
}, 'TextDetector.detect() rejects on an SVGImageElement');