forked from mirrors/gecko-dev
Automatic update from web-platform-tests shapedetection: Remove reachable NOTREACHED() When handling the various forms of a V8ImageBitmapSource there was a NOTREACHED() statement on the 3 unsupported source types, even though the detect() function also had code to throw a NotSupportedError DOMException. Since these cases are in fact reachable when those ImageBufferSource types are passed in the NOTREACHED() is inappropriate. It has been removed and tests are added to exercise this case. Bug: 1275599 Change-Id: Ie4c4367aea9f75ec60fd3c10cd297184881ecff7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3312421 Auto-Submit: Reilly Grant <reillyg@chromium.org> Reviewed-by: Chris Mumford <cmumford@google.com> Commit-Queue: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/main@{#948127} -- wpt-commits: 1408b119ac563b427a3e00a5514eef697c8da268 wpt-pr: 31826
19 lines
875 B
JavaScript
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');
|