1
0
Fork 0
firefox/testing/web-platform/tests/shape-detection/detection-SVGImageElement.https.window.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

19 lines
875 B
JavaScript

'use strict';
promise_test(async (t) => {
const image = document.createElementNS("http://www.w3.org/2000/svg", "image");
const detector = new FaceDetector();
await promise_rejects_dom(t, 'NotSupportedError', detector.detect(image));
}, 'FaceDetector.detect() rejects on an SVGImageElement');
promise_test(async (t) => {
const image = document.createElementNS("http://www.w3.org/2000/svg", "image");
const detector = new BarcodeDetector();
await promise_rejects_dom(t, 'NotSupportedError', detector.detect(image));
}, 'BarcodeDetector.detect() rejects on an SVGImageElement');
promise_test(async (t) => {
const image = document.createElementNS("http://www.w3.org/2000/svg", "image");
const detector = new TextDetector();
await promise_rejects_dom(t, 'NotSupportedError', detector.detect(image));
}, 'TextDetector.detect() rejects on an SVGImageElement');