Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <style> | 3 <style> |
| 4 @keyframes rotate { | 4 @keyframes rotate { |
| 5 0% { transform: rotate(0deg) } | 5 0% { transform: rotate(0deg) } |
| 6 } | 6 } |
| 7 | 7 |
| 8 img { | 8 img { |
| 9 transform: rotate(90deg); | 9 transform: rotate(90deg); |
| 10 } | 10 } |
| 11 </style> | 11 </style> |
| 12 | 12 |
| 13 <!-- The blue sector of the image should be at 3 o'clock (viz., rotated by 90 de g). --> | 13 <!-- The blue sector of the image should be at 3 o'clock (viz., rotated by 90 de g). --> |
| 14 <img onload="rotate(this)" width="400px" src="resources/red-at-12-oclock-with-co lor-profile.jpg"> | 14 <img onload="rotate(this)" width="400px" src="resources/red-at-12-oclock-with-co lor-profile.jpg"> |
| 15 | 15 |
| 16 <script> | 16 <script> |
| 17 function rotate(element) { | 17 function rotate(element) { |
| 18 if (window.testRunner) | |
| 19 setTimeout(function() { testRunner.setColorProfile('sRGB', new Function()) } , 0); | |
| 20 | |
| 21 element.addEventListener('animationstart', start, false); | |
| 22 element.addEventListener('animationend', end, false); | 18 element.addEventListener('animationend', end, false); |
| 23 | 19 |
| 24 if (window.testRunner) | 20 if (window.testRunner) |
| 25 element.style.cssText += 'animation: rotate linear 1s'; | 21 element.style.cssText += 'animation: rotate linear 1s'; |
| 26 else | 22 else |
| 27 element.style.cssText += 'animation: rotate linear 4s'; | 23 element.style.cssText += 'animation: rotate linear 4s'; |
| 28 } | 24 } |
| 29 | 25 |
| 30 function start(event) { | |
| 31 if (window.testRunner) | |
| 32 setTimeout(function() { testRunner.setColorProfile('colorSpin', new Function ()) }, 100); | |
|
ccameron
2017/06/13 05:19:21
Sort-of-reassured to see these "wait 100 msec and
| |
| 33 } | |
| 34 | |
| 35 function end(event) { | 26 function end(event) { |
| 36 if (window.testRunner) | 27 if (window.testRunner) |
| 37 setTimeout(function() { testRunner.notifyDone() }, 0); | 28 setTimeout(function() { testRunner.notifyDone() }, 0); |
| 38 } | 29 } |
| 39 | 30 |
| 40 if (window.testRunner) { | 31 if (window.testRunner) { |
| 41 testRunner.dumpAsTextWithPixelResults(); | 32 testRunner.dumpAsTextWithPixelResults(); |
| 42 testRunner.waitUntilDone(); | 33 testRunner.waitUntilDone(); |
| 43 } | 34 } |
| 44 </script> | 35 </script> |
| 45 </html> | 36 </html> |
| OLD | NEW |