Chromium Code Reviews| Index: LayoutTests/svg/as-image/animated-svg-as-image.html |
| diff --git a/LayoutTests/svg/as-image/animated-svg-as-image.html b/LayoutTests/svg/as-image/animated-svg-as-image.html |
| index e5f347d2f14a743bca3a8cb0758be90685212f42..a64645ca9cf518cde96e887cceb6c11198e889c1 100644 |
| --- a/LayoutTests/svg/as-image/animated-svg-as-image.html |
| +++ b/LayoutTests/svg/as-image/animated-svg-as-image.html |
| @@ -10,10 +10,15 @@ |
| if (!window.testRunner) |
| return; |
| - // The animation lasts 100ms. Wait 200ms for the repaint. |
| - setTimeout(function() { |
| + // The animation lasts 100ms so skip 12 frames to be sure. |
|
fs
2015/09/08 14:50:57
Maybe mention the expected frame duration as well
pdr.
2015/09/08 22:50:37
Done. 12 was chosen to future proof us up to 120fp
|
| + for (var i = 0; i < 12; i++) { |
| + window.internals.advanceImageAnimation(imageA); |
| + window.internals.advanceImageAnimation(imageB); |
| + } |
| + |
| + window.requestAnimationFrame(function() { |
| finishRepaintTest(); |
| - }, 200); |
| + }); |
| } |
| </script> |
| <style type="text/css" media="screen"> |
| @@ -25,8 +30,8 @@ |
| <body onload="runRepaintAndPixelTest()"> |
| <p>Images should redraw correctly when SVG animation runs</p> |
| <!-- Don't load animated-rect-fixed-size.svg, it will already be loaded, and the animation already ran if animated-svg-as-image-no-fixed-intrinsic-size.html runs before this test! --> |
| - <img height="250px" width="350px" border="2" src="resources/animated-rect-fixed-size-2.svg"><br> |
| + <img id="imageA" height="250px" width="350px" border="2" src="resources/animated-rect-fixed-size-2.svg"><br> |
| <!-- animated-rect-relative-size.svg is not loaded by any other test, so there's no problem here --> |
| - <img height="250px" width="350px" border="2" src="resources/animated-rect-relative-size.svg"> |
| + <img id="imageB" height="250px" width="350px" border="2" src="resources/animated-rect-relative-size.svg"> |
| </body> |
| </html> |