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

Side by Side 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <!-- Test for crbug.com/375765: test passes if a green square is drawn. --> 2 <!-- Test for crbug.com/375765: test passes if a green square is drawn. -->
3 <script src="../resources/text-based-repaint.js"></script> 3 <script src="../../../resources/run-after-layout-and-paint.js"></script>
4 <style> 4 <style>
5 html { 5 html {
6 zoom: 2.2; 6 zoom: 2.2;
7 } 7 }
8 * { 8 * {
9 margin: 0; 9 margin: 0;
10 padding: 0; 10 padding: 0;
11 } 11 }
12 img {
13 width: 50px;
14 height: 50px;
15 }
12 </style> 16 </style>
13 <script> 17 <script>
14 window.testIsAsync = true; 18 if (window.testRunner)
15 window.onload = runRepaintTest; 19 testRunner.waitUntilDone();
16 20 window.onload = function() {
17 function repaintTest() { 21 targetImage.onload = function() {
18 window.internals.advanceImageAnimation(targetImage); 22 runAfterLayoutAndPaint(function() {
19 window.requestAnimationFrame(function() { 23 if (window.internals) {
20 finishRepaintTest(); 24 internals.advanceImageAnimation(targetImage);
21 }); 25 runAfterLayoutAndPaint(function() {
26 internals.advanceImageAnimation(targetImage);
Xianzhu 2017/05/15 22:13:20 Without the second advanceImageAnimation, the test
pdr. 2017/05/16 01:39:50 I think I found the bug: https://cs.chromium.org/c
27 runAfterLayoutAndPaint(function() {
28 testRunner.notifyDone();
29 });
30 });
31 }
32 });
33 };
34 targetImage.src='resources/animate-center.svg';
22 }; 35 };
23 </script> 36 </script>
24 <img id="targetImage" src="resources/animate-center.svg" width="10px" height="10 px"> 37 <img id="targetImage">
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698