| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <style> | 4 <style> |
| 5 #container { | 5 #container { |
| 6 width: 400px; | 6 width: 400px; |
| 7 height: 100px; | 7 height: 100px; |
| 8 margin: 10px; | 8 margin: 10px; |
| 9 -webkit-transition-property: text-shadow; | 9 -webkit-transition-property: text-shadow; |
| 10 -webkit-transition-duration: 1s; | 10 -webkit-transition-duration: 1s; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 function setupTest() | 38 function setupTest() |
| 39 { | 39 { |
| 40 document.getElementById('container').className = 'final'; | 40 document.getElementById('container').className = 'final'; |
| 41 window.setTimeout(checkShadow, 0); | 41 window.setTimeout(checkShadow, 0); |
| 42 } | 42 } |
| 43 | 43 |
| 44 function checkShadow() | 44 function checkShadow() |
| 45 { | 45 { |
| 46 var container = document.getElementById('container'); | 46 var container = document.getElementById('container'); |
| 47 var shadow = window.getComputedStyle(container).getPropertyCSSValue('tex
t-shadow'); | 47 var shadow = window.getComputedStyle(container).textShadow; |
| 48 | 48 shadow = shadow.replace(/rgb([^)]*)/g, "color").split(","); |
| 49 |
| 49 var result = document.getElementById('result'); | 50 var result = document.getElementById('result'); |
| 50 if (shadow.length == 5) | 51 if (shadow.length == 5) |
| 51 result.innerHTML = 'PASS: saw 5 shadows during the transition'; | 52 result.innerHTML = 'PASS: saw 5 shadows during the transition'; |
| 52 else | 53 else |
| 53 result.innerHTML = 'FAIL: saw ' + shadow.length + ' shadows during t
he transition'; | 54 result.innerHTML = 'FAIL: saw ' + shadow.length + ' shadows during t
he transition'; |
| 54 | 55 |
| 55 if (window.testRunner) | 56 if (window.testRunner) |
| 56 testRunner.notifyDone(); | 57 testRunner.notifyDone(); |
| 57 } | 58 } |
| 58 | 59 |
| 59 window.addEventListener('load', setupTest, false); | 60 window.addEventListener('load', setupTest, false); |
| 60 </script> | 61 </script> |
| 61 </head> | 62 </head> |
| 62 <body> | 63 <body> |
| 63 <div id="container"> | 64 <div id="container"> |
| 64 Shadowed text | 65 Shadowed text |
| 65 </div> | 66 </div> |
| 66 <div id="result"></div> | 67 <div id="result"></div> |
| 67 </body> | 68 </body> |
| 68 </html> | 69 </html> |
| OLD | NEW |