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

Side by Side Diff: LayoutTests/accessibility/animation-policy.html

Issue 1120963003: Implements getImageAnimationPolicy() at ImageLoader. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update API name. Created 5 years, 6 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 <script>
2 var updated = false;
3 var prevTime;
4 if (window.internals)
5 internals.settings.setImageAnimationPolicy("none");
6
7 if (window.testRunner)
8 testRunner.waitUntilDone();
9
10 function changeImage() {
11 document.getElementById("target").src = "animation-green.gif";
12 updated = true;
13 }
14
15 function finishTest() {
16 if (window.testRunner)
17 testRunner.notifyDone();
18 }
19
20 function imageLoaded() {
21 if (!updated)
22 return;
23
24 var img = document.getElementById("target");
25 if (window.internals)
26 internals.advanceTimeForImage(img, 0.1);
27
28 if (window.testRunner) {
29 testRunner.layoutAndPaintAsyncThen(function () {
30 window.requestAnimationFrame(finishTest);
31 });
32 }
33 }
34 </script>
35 <body onload="changeImage()">
36 <img id="target" src="animation-blue.gif" onload="imageLoaded()">
37 </body>
OLDNEW
« no previous file with comments | « LayoutTests/accessibility/animation-green.gif ('k') | LayoutTests/accessibility/animation-policy-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698