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

Unified Diff: LayoutTests/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html
diff --git a/LayoutTests/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html b/LayoutTests/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html
index e1e7371070cc7b4d15d1fd6a0d7eaeb527bd2823..285d791255247b1a3657654c0aa5c7f3e8e24f16 100644
--- a/LayoutTests/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html
+++ b/LayoutTests/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html
@@ -10,10 +10,13 @@
if (!window.testRunner)
return;
- // The animation lasts 100ms. Wait 200ms for the repaint.
- setTimeout(function() {
+ // The animation lasts 100ms so skip 12 (12*1s/120=100ms) frames to be sure.
+ for (var i = 0; i < 12; i++)
+ window.internals.advanceImageAnimation(image);
+
+ window.requestAnimationFrame(function() {
finishRepaintTest();
- }, 200);
+ });
}
</script>
<style type="text/css" media="screen">
@@ -24,6 +27,6 @@
</head>
<body onload="runRepaintAndPixelTest()">
<p>Images should redraw correctly when SVG animation runs</p>
- <img src="resources/animated-rect-fixed-size.svg">
+ <img id="image" src="resources/animated-rect-fixed-size.svg">
</body>
</html>
« no previous file with comments | « LayoutTests/svg/as-image/animated-svg-as-image.html ('k') | LayoutTests/svg/as-image/animated-svg-as-image-same-image.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698