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

Unified 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, 7 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/accessibility/animation-policy.html
diff --git a/LayoutTests/accessibility/animation-policy.html b/LayoutTests/accessibility/animation-policy.html
new file mode 100644
index 0000000000000000000000000000000000000000..365cbabcd4df3a1f2665f8b46d9c4b5f247efb1e
--- /dev/null
+++ b/LayoutTests/accessibility/animation-policy.html
@@ -0,0 +1,37 @@
+<script>
+var updated = false;
+var prevTime;
+if (window.internals)
+ internals.settings.setImageAnimationPolicy("none");
+
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
+function changeImage() {
+ document.getElementById("target").src = "animation-green.gif";
+ updated = true;
+}
+
+function finishTest() {
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+
+function imageLoaded() {
+ if (!updated)
+ return;
+
+ var img = document.getElementById("target");
+ if (window.internals)
+ internals.advanceTimeForImage(img, 0.1);
+
+ if (window.testRunner) {
+ testRunner.layoutAndPaintAsyncThen(function () {
+ window.requestAnimationFrame(finishTest);
+ });
+ }
+}
+</script>
+<body onload="changeImage()">
+<img id="target" src="animation-blue.gif" onload="imageLoaded()">
+</body>
« 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