Skip to content

Commit

Permalink
Add a web platform test for APNG
Browse files Browse the repository at this point in the history
While animated-png.html uses internals for selecting frames and
verifying that we decode APNGs properly, this test confirms that a
basic animation will work correctly, and can work in other browsers.

- apng.png
A simple APNG with two frames. The first frame is red, and displays
for as short a time as possible (11 ms; anything less than that and
Chromium increases the time), followed by a green frame. The image
does not loop. The green frame matches green.png, which already
exists

- animated-png-timeout-ref.html
Reference page showing the existing image (green.png).

BUG=437662

Review-Url: https://codereview.chromium.org/2814453004
Cr-Commit-Position: refs/heads/master@{#464038}
  • Loading branch information
LeonScroggins authored and chromium-wpt-export-bot committed Apr 12, 2017
1 parent 6962792 commit 0a441e3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions apng/animated-png-timeout-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<img src=../images/green.png>
11 changes: 11 additions & 0 deletions apng/animated-png-timeout.html
Original file line number Diff line number Diff line change
@@ -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>
Binary file added images/apng.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions lint.whitelist
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ TRAILING WHITESPACE:webgl/tools/*.patch
SET TIMEOUT: *-manual.*
SET TIMEOUT: 2dcontext/*
SET TIMEOUT: annotation-model/scripts/ajv.min.js
SET TIMEOUT: apng/animated-png-timeout.html
SET TIMEOUT: cookies/resources/testharness-helpers.js
SET TIMEOUT: common/reftest-wait.js
SET TIMEOUT: conformance-checkers/*
Expand Down

0 comments on commit 0a441e3

Please sign in to comment.