| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <style> | 3 <style> |
| 4 div { | 4 div { |
| 5 transform: scale(2.7937); | 5 transform: scale(2.7937); |
| 6 background-image: url('./resources/pixel-crack-image-background-webkit-t
ransform-scale.png'); | 6 background-image: url('./resources/pixel-crack-image-background-webkit-t
ransform-scale.png'); |
| 7 background-position: 16px 16px; | 7 background-position: 16px 16px; |
| 8 height: 16px; | 8 height: 16px; |
| 9 width: 16px; | 9 width: 16px; |
| 10 position:absolute; | 10 position:absolute; |
| 11 } | 11 } |
| 12 </style> | 12 </style> |
| 13 | 13 |
| 14 <script type = "text/javascript"> | 14 <script type = "text/javascript"> |
| 15 | 15 |
| 16 function runTest() | 16 function runTest() |
| 17 { | 17 { |
| 18 for (var j=6; j<=35; ++j) | 18 for (var j=6; j<=35; ++j) |
| 19 for (var i=1; i<=40; ++i) { | 19 for (var i=1; i<=40; ++i) { |
| 20 var div = document.createElement('div'); | 20 var div = document.createElement('div'); |
| 21 div.style.left = i*12; | 21 div.style.left = i*12; |
| 22 div.style.top = j*12; | 22 div.style.top = j*12; |
| 23 document.body.appendChild(div); | 23 document.body.appendChild(div); |
| 24 } | 24 } |
| 25 } | 25 } |
| 26 if (window.testRunner) { |
| 27 testRunner.waitUntilDone(); |
| 28 window.addEventListener('load', () => { |
| 29 // This is a workaroud for an issue that the load event may be |
| 30 // dispatched before loading the background image. See |
| 31 // https://crbug.com/675870. |
| 32 const id = setInterval(() => { |
| 33 // Force layout. |
| 34 document.body.offsetTop; |
| 35 if (internals.isLoading('./resources/pixel-crack-image-backgroun
d-webkit-transform-scale.png')) { |
| 36 return; |
| 37 } |
| 38 clearInterval(id); |
| 39 testRunner.notifyDone(); |
| 40 }, 50); |
| 41 }); |
| 42 } |
| 26 </script> | 43 </script> |
| 27 </head> | 44 </head> |
| 28 <body onload="runTest()"> | 45 <body onload="runTest()"> |
| 29 <p> | 46 <p> |
| 30 Test pixel cracks when background sprite is transformed with scale. Need to run
pixel test to verify if it is successful. | 47 Test pixel cracks when background sprite is transformed with scale. Need to run
pixel test to verify if it is successful. |
| 31 </p> | 48 </p> |
| 32 </body> | 49 </body> |
| 33 </html> | 50 </html> |
| OLD | NEW |