| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script>jsTestIsAsync = true;</script> | |
| 4 <script src="../../resources/js-test.js"></script> | |
| 5 <script src="../../resources/run-after-display.js"></script> | 3 <script src="../../resources/run-after-display.js"></script> |
| 4 <script src="resources/text-based-repaint.js"></script> |
| 6 <style type="text/css"> | 5 <style type="text/css"> |
| 7 #test1 div { | 6 #test1 div { |
| 8 height: 100px; | 7 height: 100px; |
| 9 width: 100px; | 8 width: 100px; |
| 10 } | 9 } |
| 11 #test1 .parent { | 10 #test1 .parent { |
| 12 background-image: url(resources/animated.gif) | 11 background-image: url(resources/animated.gif) |
| 13 } | 12 } |
| 14 #test1 .child { | 13 #test1 .child { |
| 15 background-color: green; | 14 background-color: green; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 39 position: relative; | 38 position: relative; |
| 40 height: 100px; | 39 height: 100px; |
| 41 width: 100px; | 40 width: 100px; |
| 42 background-color: red; | 41 background-color: red; |
| 43 background-repeat: no-repeat; | 42 background-repeat: no-repeat; |
| 44 background-position: center; | 43 background-position: center; |
| 45 background-image: url(resources/animated.gif) | 44 background-image: url(resources/animated.gif) |
| 46 } | 45 } |
| 47 </style> | 46 </style> |
| 48 <script> | 47 <script> |
| 49 description("Test that obscured animated gif does not trigger repaints. This
test requires DRT."); | 48 // Test that obscured animated gif does not trigger repaints. |
| 50 function startTrackingRepaints() | 49 if (window.testRunner) |
| 50 testRunner.waitUntilDone(); |
| 51 window.testIsAsync = true; |
| 52 function repaintTest() |
| 51 { | 53 { |
| 52 document.body.offsetTop; | 54 runAfterDisplay(finishRepaintTest); |
| 53 window.internals.startTrackingRepaints(document); | |
| 54 runAfterDisplay(logRepaints); | |
| 55 } | |
| 56 | |
| 57 function logRepaints() { | |
| 58 repaintRects = window.internals.repaintRectsAsText(document); | |
| 59 window.internals.stopTrackingRepaints(document); | |
| 60 | |
| 61 shouldBeEqualToString("repaintRects", ""); | |
| 62 | |
| 63 finishJSTest(); | |
| 64 } | 55 } |
| 65 | 56 |
| 66 function start() { | 57 function start() { |
| 67 if (!window.testRunner || !window.internals) | 58 if (!window.testRunner || !window.internals) |
| 68 return; | 59 return; |
| 69 | 60 |
| 70 var img = new Image(); | 61 var img = new Image(); |
| 71 img.onload = startTrackingRepaints; | 62 img.onload = runRepaintTest; |
| 72 img.src = "resources/animated.gif"; | 63 img.src = "resources/animated.gif"; |
| 73 } | 64 } |
| 74 </script> | 65 </script> |
| 75 </head> | 66 </head> |
| 76 <body onload="start()"> | 67 <body onload="start()"> |
| 77 <div id="test1"> | 68 <div id="test1"> |
| 78 <div class="parent"> | 69 <div class="parent"> |
| 79 <div class="child"> | 70 <div class="child"> |
| 80 </div> | 71 </div> |
| 81 </div> | 72 </div> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 94 <a> | 85 <a> |
| 95 <div></div> | 86 <div></div> |
| 96 <div> | 87 <div> |
| 97 <img src="resources/apple.jpg"> | 88 <img src="resources/apple.jpg"> |
| 98 </div> | 89 </div> |
| 99 </a> | 90 </a> |
| 100 </div> | 91 </div> |
| 101 </div> | 92 </div> |
| 102 </body> | 93 </body> |
| 103 </html> | 94 </html> |
| OLD | NEW |