Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / animation-policy.html
blob365cbabcd4df3a1f2665f8b46d9c4b5f247efb1e
1 <script>
2 var updated = false;
3 var prevTime;
4 if (window.internals)
5 internals.settings.setImageAnimationPolicy("none");
7 if (window.testRunner)
8 testRunner.waitUntilDone();
10 function changeImage() {
11 document.getElementById("target").src = "animation-green.gif";
12 updated = true;
15 function finishTest() {
16 if (window.testRunner)
17 testRunner.notifyDone();
20 function imageLoaded() {
21 if (!updated)
22 return;
24 var img = document.getElementById("target");
25 if (window.internals)
26 internals.advanceTimeForImage(img, 0.1);
28 if (window.testRunner) {
29 testRunner.layoutAndPaintAsyncThen(function () {
30 window.requestAnimationFrame(finishTest);
31 });
34 </script>
35 <body onload="changeImage()">
36 <img id="target" src="animation-blue.gif" onload="imageLoaded()">
37 </body>