OLD | NEW |
| 1 <!-- Based on fast/repaint/obscured-background-no-repaint.html --> |
1 <html> | 2 <html> |
2 <head> | 3 <head> |
3 <script src="../../resources/run-after-layout-and-paint.js"></script> | 4 <script src="../../../fast/repaint/../../resources/run-after-layout-and-paint.js
"></script> |
4 <script src="resources/text-based-repaint.js"></script> | 5 <script src="resources/paint-invalidation-test.js"></script> |
5 <style type="text/css"> | 6 <style type="text/css"> |
6 #test1 div { | 7 #test1 div { |
7 height: 100px; | 8 height: 100px; |
8 width: 100px; | 9 width: 100px; |
9 } | 10 } |
10 #test1 .parent { | 11 #test1 .parent { |
11 background-image: url(resources/animated.gif) | 12 background-image: url(../../../fast/repaint/resources/animated.gif) |
12 } | 13 } |
13 #test1 .child { | 14 #test1 .child { |
14 background-color: green; | 15 background-color: green; |
15 } | 16 } |
16 | 17 |
17 #test2 .parent { | 18 #test2 .parent { |
18 position: relative; | 19 position: relative; |
19 height: 100px; | 20 height: 100px; |
20 width: 100px; | 21 width: 100px; |
21 background-image: url(resources/animated.gif); | 22 background-image: url(../../../fast/repaint/resources/animated.gif); |
22 background-repeat: no-repeat; | 23 background-repeat: no-repeat; |
23 background-position: center; | 24 background-position: center; |
24 } | 25 } |
25 | 26 |
26 #test2 .child { | 27 #test2 .child { |
27 background-color: green; | 28 background-color: green; |
28 position: relative; | 29 position: relative; |
29 left: 25px; | 30 left: 25px; |
30 top: 25px; | 31 top: 25px; |
31 height: 50px; | 32 height: 50px; |
32 width: 50px; | 33 width: 50px; |
33 } | 34 } |
34 #test3 img { | 35 #test3 img { |
35 background-image: url(resources/animated.gif) | 36 background-image: url(../../../fast/repaint/resources/animated.gif) |
36 } | 37 } |
37 #test4 .parent { | 38 #test4 .parent { |
38 position: relative; | 39 position: relative; |
39 height: 100px; | 40 height: 100px; |
40 width: 100px; | 41 width: 100px; |
41 background-color: red; | 42 background-color: red; |
42 background-repeat: no-repeat; | 43 background-repeat: no-repeat; |
43 background-position: center; | 44 background-position: center; |
44 background-image: url(resources/animated.gif) | 45 background-image: url(../../../fast/repaint/resources/animated.gif) |
45 } | 46 } |
46 </style> | 47 </style> |
47 <script> | 48 <script> |
48 // Test that obscured animated gif does not trigger repaints. | 49 // Test that obscured animated gif does not trigger repaints. |
49 if (window.testRunner) | 50 if (window.testRunner) { |
50 testRunner.waitUntilDone(); | 51 testRunner.waitUntilDone(); |
| 52 testRunner.dumpAsText(); |
| 53 } |
51 window.testIsAsync = true; | 54 window.testIsAsync = true; |
52 function repaintTest() | 55 window.expectedPaintInvalidationObjects = [ |
| 56 ]; |
| 57 function paintInvalidationTest() |
53 { | 58 { |
54 runAfterLayoutAndPaint(finishRepaintTest); | 59 runAfterLayoutAndPaint(finishPaintInvalidationTest); |
55 } | 60 } |
56 | 61 |
57 function start() { | 62 function start() { |
58 if (!window.testRunner || !window.internals) | 63 if (!window.testRunner || !window.internals) |
59 return; | 64 return; |
60 | 65 |
61 var img = new Image(); | 66 var img = new Image(); |
62 img.onload = runRepaintTest; | 67 img.onload = runPaintInvalidationTest; |
63 img.src = "resources/animated.gif"; | 68 img.src = "../../../fast/repaint/resources/animated.gif"; |
64 } | 69 } |
65 </script> | 70 </script> |
66 </head> | 71 </head> |
67 <body onload="start()"> | 72 <body onload="start()"> |
68 <div id="test1"> | 73 <div id="test1"> |
69 <div class="parent"> | 74 <div class="parent"> |
70 <div class="child"> | 75 <div class="child"> |
71 </div> | 76 </div> |
72 </div> | 77 </div> |
73 </div> | 78 </div> |
74 <div id="test2"> | 79 <div id="test2"> |
75 <div class="parent"> | 80 <div class="parent"> |
76 <div class="child"> | 81 <div class="child"> |
77 </div> | 82 </div> |
78 </div> | 83 </div> |
79 </div> | 84 </div> |
80 <div id="test3"> | 85 <div id="test3"> |
81 <img src="resources/apple.jpg"> | 86 <img src="../../../fast/repaint/resources/apple.jpg"> |
82 </div> | 87 </div> |
83 <div id="test4"> | 88 <div id="test4"> |
84 <div class="parent"> | 89 <div class="parent"> |
85 <a> | 90 <a> |
86 <div></div> | 91 <div></div> |
87 <div> | 92 <div> |
88 <img src="resources/apple.jpg"> | 93 <img src="../../../fast/repaint/resources/apple.jpg"> |
89 </div> | 94 </div> |
90 </a> | 95 </a> |
91 </div> | 96 </div> |
92 </div> | 97 </div> |
93 </body> | 98 </body> |
94 </html> | 99 </html> |
OLD | NEW |