OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <style> |
| 4 .fade { |
| 5 -webkit-animation: fader linear 0.5s |
| 6 } |
| 7 |
| 8 @-webkit-keyframes fader { |
| 9 0% { opacity: 1.0 } |
| 10 50% { opacity: 0.0 } |
| 11 } |
| 12 </style> |
| 13 |
| 14 <!-- The blue sector of the image should be at 12 o'clock. --> |
| 15 <img onload="fade(this)" width="400px" src="resources/red-at-12-oclock-with-colo
r-profile.jpg"> |
| 16 |
| 17 <script> |
| 18 function fade(element) { |
| 19 element.addEventListener('webkitAnimationEnd', end, false); |
| 20 element.classList.toggle('fade'); |
| 21 } |
| 22 |
| 23 function end(event) { |
| 24 if (window.testRunner) |
| 25 testRunner.setColorProfile('test', done); |
| 26 } |
| 27 |
| 28 function done() { |
| 29 setTimeout(function() { testRunner.notifyDone() }, 0); |
| 30 } |
| 31 |
| 32 if (window.testRunner) { |
| 33 testRunner.dumpAsTextWithPixelResults(); |
| 34 testRunner.waitUntilDone(); |
| 35 } |
| 36 </script> |
| 37 </html> |
OLD | NEW |