OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <html> |
| 3 <style> |
| 4 #target { |
| 5 transition-duration: 1s; |
| 6 } |
| 7 </style> |
| 8 <div id="target"></div> |
| 9 <script src="../../resources/js-test.js"></script> |
| 10 |
| 11 <script> |
| 12 if (window.testRunner) |
| 13 testRunner.dumpAsText(); |
| 14 |
| 15 description("Test for Bug 310403: CssStyleDeclaration improperly sets transition
shorthand when transition-duration is set."); |
| 16 |
| 17 var sheet = document.styleSheets[0]; |
| 18 var rule = sheet.rules[0]; |
| 19 shouldBe("rule.cssText","'#target { transition-duration: 1s; -webkit-transition-
duration: 1s; }'"); |
| 20 rule.style.setProperty('transition-delay', '0s'); |
| 21 shouldBe("rule.cssText","'#target { transition-duration: 1s; -webkit-transition-
duration: 1s; transition-delay: 0s; -webkit-transition-delay: 0s; }'"); |
| 22 rule.style.setProperty('transition-property', 'all'); |
| 23 shouldBe("rule.cssText","'#target { transition-duration: 1s; -webkit-transition-
duration: 1s; transition-delay: 0s; -webkit-transition-delay: 0s; transition-pro
perty: all; -webkit-transition-property: all; }'"); |
| 24 rule.style.setProperty('transition-timing-function', 'ease'); |
| 25 shouldBe("rule.cssText","'#target { transition: all 1s ease 0s; -webkit-transiti
on: all 1s ease 0s; }'"); |
| 26 |
| 27 </script> |
| 28 |
| 29 </html> |
OLD | NEW |