Bug 1444382 [wpt PR 9943] - [PE] Add "image/apng" to supported image MIME types, a=testonly

Automatic update from web-platform-tests[PE] Add "image/apng" to supported image MIME types

Supported for animated PNG (APNG) was added via crbug.com/437662 (commit
7d2b8c45afc9c0230410011293cc2e1dbb8943a7.) The "image/apng" MIME type is
included in the "Accept" header for image requests.

Add "image/apng" to kSupportedImageTypes to allow things like the
<picture> element to work (select an appropriate image based on 'type'.)

Add "image/apng" to kPrimaryMappings to allow the MIME type to resolve
to a reasonable file extension.

Bug: 730588
Change-Id: I070e8b16dc8312552b11dc32e776493b3a5be669
Reviewed-on: https://chromium-review.googlesource.com/957092
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Asanka Herath <asanka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542113}

wpt-commits: de0c4ad1634bac712eadecf9a1a170eaf375ae8e
wpt-pr: 9943
wpt-commits: de0c4ad1634bac712eadecf9a1a170eaf375ae8e
wpt-pr: 9943
This commit is contained in:
Fredrik Söderquist 2018-03-26 15:40:08 +00:00 committed by James Graham
parent 7c0f2acf9c
commit 39b7ebcb72
2 changed files with 33 additions and 0 deletions

View File

@ -306307,6 +306307,12 @@
{}
]
],
"apng/supported-in-source-type.html": [
[
"/apng/supported-in-source-type.html",
{}
]
],
"audio-output/HTMLMediaElement-sinkId-idl.html": [
[
"/audio-output/HTMLMediaElement-sinkId-idl.html",
@ -400104,6 +400110,10 @@
"b9ba0287c92e5dbda1dc207ab45e9c90e8618878",
"reftest"
],
"apng/supported-in-source-type.html": [
"32cf112fb1dcb4e7ec3c91bdf5bd6b976a1e4eac",
"testharness"
],
"audio-output/HTMLMediaElement-sinkId-idl.html": [
"8f37d8d2fc1cb9b5ad0d85234f733f534f4f0db8",
"testharness"

View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<title>Animated PNG MIME type (image/apng) is recognized by &lt;source type></title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
function resolveUrl(relativeUrl) {
var a = document.createElement('a');
a.href = relativeUrl;
return a.href;
}
async_test(t => {
window.onload = t.step_func_done(() => {
let image = document.querySelector('img');
let apngSrc = document.querySelector('source');
assert_equals(image.currentSrc, resolveUrl(apngSrc.srcset));
});
});
</script>
<picture>
<source srcset="/images/anim-gr.png" type="image/apng">
<img src="/images/anim-gr.gif" style="visibility: hidden">
</picture>