| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 This tests verifies that shadow is repainted using the full source image of
the element instead of just the dirty area. | 3 This tests verifies that shadow is repainted using the full source image of
the element instead of just the dirty area. |
| 4 There should be 3 green boxes of same size with blue shadow on the lower rig
ht corner. Check that the shadow is not interrupted. | 4 There should be 3 green boxes of same size with blue shadow on the lower rig
ht corner. Check that the shadow is not interrupted. |
| 5 --> | 5 --> |
| 6 <html> | 6 <html> |
| 7 <head> | 7 <head> |
| 8 <style> | 8 <style> |
| 9 .box { | 9 .box { |
| 10 margin: 10px; | 10 margin: 10px; |
| 11 height: 50px; | 11 height: 50px; |
| 12 width: 50px; | 12 width: 50px; |
| 13 background-color: green; | 13 background-color: green; |
| 14 } | 14 } |
| 15 | 15 |
| 16 .before { | 16 .before { |
| 17 background-color: red; | 17 background-color: red; |
| 18 } | 18 } |
| 19 | 19 |
| 20 .shadow { | 20 .shadow { |
| 21 margin: 50px; | 21 margin: 50px; |
| 22 -webkit-filter: drop-shadow(10px 10px 10px blue); | 22 -webkit-filter: drop-shadow(10px 10px 10px blue); |
| 23 } | 23 } |
| 24 </style> | 24 </style> |
| 25 | 25 |
| 26 <script src="../../fast/repaint/resources/repaint.js"></script> | 26 <script src="../../resources/run-after-display.js"></script> |
| 27 <script> | 27 <script> |
| 28 if (window.testRunner) | 28 if (window.testRunner) { |
| 29 testRunner.dumpAsTextWithPixelResults(); | 29 testRunner.dumpAsTextWithPixelResults(); |
| 30 testRunner.waitUntilDone(); |
| 31 } |
| 30 | 32 |
| 31 function repaintTest() | 33 function repaintTest() |
| 32 { | 34 { |
| 33 document.querySelector(".before").classList.remove("before"); | 35 runAfterDisplay(function() { |
| 36 document.querySelector(".before").classList.remove("before"); |
| 37 if (window.testRunner) |
| 38 testRunner.notifyDone(); |
| 39 }); |
| 34 } | 40 } |
| 35 </script> | 41 </script> |
| 36 </head> | 42 </head> |
| 37 | 43 |
| 38 <body onload="runRepaintTest()"> | 44 <body onload="repaintTest()"> |
| 39 | 45 |
| 40 <div class="shadow"> | 46 <div class="shadow"> |
| 41 <div class="box"></div> | 47 <div class="box"></div> |
| 42 <div class="box before"></div> | 48 <div class="box before"></div> |
| 43 <div class="box"></div> | 49 <div class="box"></div> |
| 44 </div> | 50 </div> |
| 45 | 51 |
| 46 </body> | 52 </body> |
| 47 </html> | 53 </html> |
| OLD | NEW |