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

Unified Diff: third_party/WebKit/LayoutTests/paint/invalidation/svg/image-animation-with-zoom.html

Issue 2882873002: Deflake paint/invalidation/svg/image-animation-with-zoom.html (Closed)
Patch Set: - Created 3 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: third_party/WebKit/LayoutTests/paint/invalidation/svg/image-animation-with-zoom.html
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/image-animation-with-zoom.html b/third_party/WebKit/LayoutTests/paint/invalidation/svg/image-animation-with-zoom.html
index 280ffd168d99105ae080f5499f71fce245aca1a0..67fe417e8330098896f1f33969d6f7637f5d7926 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/image-animation-with-zoom.html
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/image-animation-with-zoom.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<!-- Test for crbug.com/375765: test passes if a green square is drawn. -->
-<script src="../resources/text-based-repaint.js"></script>
+<script src="../../../resources/run-after-layout-and-paint.js"></script>
<style>
html {
zoom: 2.2;
@@ -9,16 +9,29 @@
margin: 0;
padding: 0;
}
+ img {
+ width: 50px;
+ height: 50px;
+ }
</style>
<script>
-window.testIsAsync = true;
-window.onload = runRepaintTest;
-
-function repaintTest() {
- window.internals.advanceImageAnimation(targetImage);
- window.requestAnimationFrame(function() {
- finishRepaintTest();
- });
+if (window.testRunner)
+ testRunner.waitUntilDone();
+onload = function() {
+ if (window.testRunner && window.internals) {
+ targetImage.onload = function() {
+ requestAnimationFrame(function() {
+ internals.advanceImageAnimation(targetImage);
+ requestAnimationFrame(function() {
+ internals.advanceImageAnimation(targetImage);
+ requestAnimationFrame(function() {
+ testRunner.notifyDone();
+ });
+ });
+ });
+ };
+ }
+ targetImage.src='resources/animate-center.svg';
};
</script>
-<img id="targetImage" src="resources/animate-center.svg" width="10px" height="10px">
+<img id="targetImage">

Powered by Google App Engine
This is Rietveld 408576698