OLD | NEW |
---|---|
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../resources/run-after-layout-and-paint.js"></script> | 3 <script src="../../resources/run-after-layout-and-paint.js"></script> |
4 <script src="resources/text-based-repaint.js"></script> | 4 <script src="resources/text-based-repaint.js"></script> |
5 <style type="text/css"> | 5 <style type="text/css"> |
6 #test1 div { | 6 #test1 div { |
7 height: 100px; | 7 height: 100px; |
8 width: 100px; | 8 width: 100px; |
9 } | 9 } |
10 #test1 .parent { | 10 #test1 .parent { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 background-image: url(resources/animated.gif) | 44 background-image: url(resources/animated.gif) |
45 } | 45 } |
46 </style> | 46 </style> |
47 <script> | 47 <script> |
48 // Test that obscured animated gif does not trigger repaints. | 48 // Test that obscured animated gif does not trigger repaints. |
49 if (window.testRunner) | 49 if (window.testRunner) |
50 testRunner.waitUntilDone(); | 50 testRunner.waitUntilDone(); |
51 window.testIsAsync = true; | 51 window.testIsAsync = true; |
52 function repaintTest() | 52 function repaintTest() |
53 { | 53 { |
54 runAfterLayoutAndPaint(finishRepaintTest); | 54 setTimeout(finishRepaintTest, 300); |
Stephen Chennney
2016/08/09 14:22:31
Timeouts should be avoided if at all possible. The
Xianzhu
2016/08/09 18:51:48
Unfortunately there seems no other ways for such t
| |
55 } | 55 } |
56 | 56 |
57 function start() { | 57 function start() { |
58 if (!window.testRunner || !window.internals) | 58 if (!window.testRunner || !window.internals) |
59 return; | 59 return; |
60 | 60 |
61 var img = new Image(); | 61 var img = new Image(); |
62 img.onload = runRepaintTest; | 62 img.onload = function() { |
63 runAfterLayoutAndPaint(runRepaintTest); | |
64 }; | |
63 img.src = "resources/animated.gif"; | 65 img.src = "resources/animated.gif"; |
64 } | 66 } |
65 </script> | 67 </script> |
66 </head> | 68 </head> |
67 <body onload="start()"> | 69 <body onload="start()"> |
68 <div id="test1"> | 70 <div id="test1"> |
69 <div class="parent"> | 71 <div class="parent"> |
70 <div class="child"> | 72 <div class="child"> |
71 </div> | 73 </div> |
72 </div> | 74 </div> |
(...skipping 12 matching lines...) Expand all Loading... | |
85 <a> | 87 <a> |
86 <div></div> | 88 <div></div> |
87 <div> | 89 <div> |
88 <img src="resources/apple.jpg"> | 90 <img src="resources/apple.jpg"> |
89 </div> | 91 </div> |
90 </a> | 92 </a> |
91 </div> | 93 </div> |
92 </div> | 94 </div> |
93 </body> | 95 </body> |
94 </html> | 96 </html> |
OLD | NEW |