Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: LayoutTests/fast/images/animated-gif-advance-frames.html

Issue 1304093006: Add a new API for testing animated images (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase harder Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <img id="a" width="25" height="25" src="resources/green-red-blue-yellow-animated .gif?a">
3 <img id="b" width="25" height="25" src="resources/green-red-blue-yellow-animated .gif?b">
4 <img id="c" width="25" height="25" src="resources/green-red-blue-yellow-animated .gif?c">
5 <img id="d" width="25" height="25" src="resources/green-red-blue-yellow-animated .gif?d">
6 <img id="e" width="25" height="25" src="resources/green-red-blue-yellow-animated .gif?e">
7 <script>
8 if (window.testRunner)
9 testRunner.waitUntilDone();
10
11 window.onload = function() {
12 // Jump to the 2nd frame.
13 window.internals.advanceImageAnimation(b);
14
15 // Jump to the 3rd frame.
16 for (var i = 0; i < 2; i++)
17 window.internals.advanceImageAnimation(c);
18
19 // Jump to the 4th frame.
20 for (var i = 0; i < 3; i++)
21 window.internals.advanceImageAnimation(d);
22
23 // Ensure the animation can loop and get back to the first frame.
24 for (var i = 0; i < 4; i++)
25 window.internals.advanceImageAnimation(e);
26
27 requestAnimationFrame(function() {
28 if (window.testRunner)
29 testRunner.notifyDone();
30 });
31 }
32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698