summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/apng
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /testing/web-platform/tests/apng
parentInitial commit. (diff)
downloadthunderbird-upstream.tar.xz
thunderbird-upstream.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/apng')
-rw-r--r--testing/web-platform/tests/apng/META.yml5
-rw-r--r--testing/web-platform/tests/apng/animated-png-timeout-ref.html1
-rw-r--r--testing/web-platform/tests/apng/animated-png-timeout.html11
-rw-r--r--testing/web-platform/tests/apng/supported-in-source-type.html23
4 files changed, 40 insertions, 0 deletions
diff --git a/testing/web-platform/tests/apng/META.yml b/testing/web-platform/tests/apng/META.yml
new file mode 100644
index 0000000000..a660c7e19e
--- /dev/null
+++ b/testing/web-platform/tests/apng/META.yml
@@ -0,0 +1,5 @@
+spec: https://wiki.mozilla.org/APNG_Specification
+suggested_reviewers:
+ - stuartparmenter
+ - svgeesus
+ - leonscroggins
diff --git a/testing/web-platform/tests/apng/animated-png-timeout-ref.html b/testing/web-platform/tests/apng/animated-png-timeout-ref.html
new file mode 100644
index 0000000000..c46bb90164
--- /dev/null
+++ b/testing/web-platform/tests/apng/animated-png-timeout-ref.html
@@ -0,0 +1 @@
+<img src=../images/green.png>
diff --git a/testing/web-platform/tests/apng/animated-png-timeout.html b/testing/web-platform/tests/apng/animated-png-timeout.html
new file mode 100644
index 0000000000..6975bd9c4e
--- /dev/null
+++ b/testing/web-platform/tests/apng/animated-png-timeout.html
@@ -0,0 +1,11 @@
+<html class="reftest-wait">
+<title>APNG: Second frame displays quickly, replacing red with green.</title>
+<link rel="match" href="animated-png-timeout-ref.html"/>
+<img src=../images/apng.png onload="loaded()"/>
+<script>
+ function loaded() {
+ setTimeout(function() {
+ document.documentElement.classList.remove("reftest-wait");
+ }, 1000);
+ }
+</script>
diff --git a/testing/web-platform/tests/apng/supported-in-source-type.html b/testing/web-platform/tests/apng/supported-in-source-type.html
new file mode 100644
index 0000000000..0a4d232dcb
--- /dev/null
+++ b/testing/web-platform/tests/apng/supported-in-source-type.html
@@ -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>