Bug 1696983 [wpt PR 27889] - Replace ImageDecoder::canDecodeType() with async isTypeSupported()., a=testonly

Automatic update from web-platform-tests
Replace ImageDecoder::canDecodeType() with async isTypeSupported().

This updates us with the latest planned version of the spec.

R=chcunningham

Bug: 1182435
Test: Updated tests. New WPT tests.
Change-Id: I47a981b26f89f94cf943e0a356202c129f285e94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2733922
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#860145}

--

wpt-commits: e055b8d439d6f4b09635f1f0c3180e17cf368071
wpt-pr: 27889
This commit is contained in:
Dale Curtis 2021-03-10 21:14:48 +00:00 коммит произвёл moz-wptsync-bot
Родитель 14c656dbfb
Коммит ad3b855015
1 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -85,3 +85,18 @@ promise_test(t => {
promise_test(t => {
return testFourColorsDecode('four-colors.gif', 'image/gif');
}, 'Test GIF image decoding.');
promise_test(t => {
return fetch('four-colors.png').then(response => {
let decoder = new ImageDecoder({data: response.body, type: 'junk/type'});
return promise_rejects_dom(t, 'NotSupportedError', decoder.decode());
});
}, 'Test invalid mime type rejects decode() requests');
promise_test(t => {
return fetch('four-colors.png').then(response => {
let decoder = new ImageDecoder({data: response.body, type: 'junk/type'});
return promise_rejects_dom(
t, 'NotSupportedError', decoder.decodeMetadata());
});
}, 'Test invalid mime type rejects decodeMetadata() requests');