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