OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../resources/js-test.js"></script> | 4 <script src="../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 description("Test the parsing and the computed style values of the transitions p
roperties.") | 8 description("Test the parsing and the computed style values of the transitions p
roperties.") |
9 | 9 |
10 var testContainer = document.createElement("div"); | 10 var testContainer = document.createElement("div"); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 shouldBe("computedStyle.transitionProperty", "'font-size, color, all'"); | 78 shouldBe("computedStyle.transitionProperty", "'font-size, color, all'"); |
79 shouldBe("style.webkitTransitionProperty", "'font-size, color, all'"); | 79 shouldBe("style.webkitTransitionProperty", "'font-size, color, all'"); |
80 shouldBe("computedStyle.webkitTransitionProperty", "'font-size, color, all'"); | 80 shouldBe("computedStyle.webkitTransitionProperty", "'font-size, color, all'"); |
81 | 81 |
82 style.transitionProperty = "font-size, all, color"; | 82 style.transitionProperty = "font-size, all, color"; |
83 shouldBe("style.transitionProperty", "'font-size, all, color'"); | 83 shouldBe("style.transitionProperty", "'font-size, all, color'"); |
84 shouldBe("computedStyle.transitionProperty", "'font-size, all, color'"); | 84 shouldBe("computedStyle.transitionProperty", "'font-size, all, color'"); |
85 shouldBe("style.webkitTransitionProperty", "'font-size, all, color'"); | 85 shouldBe("style.webkitTransitionProperty", "'font-size, all, color'"); |
86 shouldBe("computedStyle.webkitTransitionProperty", "'font-size, all, color'"); | 86 shouldBe("computedStyle.webkitTransitionProperty", "'font-size, all, color'"); |
87 | 87 |
| 88 debug("Unknown transition-property values."); |
| 89 |
| 90 style.transitionProperty = "solid, font-size"; |
| 91 shouldBe("style.transitionProperty", "'solid, font-size'"); |
| 92 shouldBe("computedStyle.transitionProperty", "'solid, font-size'"); |
| 93 shouldBe("style.webkitTransitionProperty", "'solid, font-size'"); |
| 94 shouldBe("computedStyle.webkitTransitionProperty", "'solid, font-size'"); |
| 95 |
| 96 style.transitionProperty = "solid, left"; |
| 97 shouldBe("style.transitionProperty", "'solid, left'"); |
| 98 shouldBe("computedStyle.transitionProperty", "'solid, left'"); |
| 99 shouldBe("style.webkitTransitionProperty", "'solid, left'"); |
| 100 shouldBe("computedStyle.webkitTransitionProperty", "'solid, left'"); |
| 101 |
| 102 style.transitionProperty = "solid"; |
| 103 shouldBe("style.transitionProperty", "'solid'"); |
| 104 shouldBe("computedStyle.transitionProperty", "'solid'"); |
| 105 shouldBe("style.webkitTransitionProperty", "'solid'"); |
| 106 shouldBe("computedStyle.webkitTransitionProperty", "'solid'"); |
| 107 |
88 debug("Invalid transition-property values."); | 108 debug("Invalid transition-property values."); |
89 style.transitionProperty = ""; | 109 style.transitionProperty = ""; |
90 | 110 |
91 style.transitionProperty = "solid, font-size"; | |
92 shouldBe("style.transitionProperty", "''"); | |
93 shouldBe("computedStyle.transitionProperty", "'all'"); | |
94 shouldBe("style.webkitTransitionProperty", "''"); | |
95 shouldBe("computedStyle.webkitTransitionProperty", "'all'"); | |
96 | |
97 style.transitionProperty = "solid, left"; | |
98 shouldBe("style.transitionProperty", "''"); | |
99 shouldBe("computedStyle.transitionProperty", "'all'"); | |
100 shouldBe("style.webkitTransitionProperty", "''"); | |
101 shouldBe("computedStyle.webkitTransitionProperty", "'all'"); | |
102 | |
103 style.transitionProperty = "solid"; | |
104 shouldBe("style.transitionProperty", "''"); | |
105 shouldBe("computedStyle.transitionProperty", "'all'"); | |
106 shouldBe("style.webkitTransitionProperty", "''"); | |
107 shouldBe("computedStyle.webkitTransitionProperty", "'all'"); | |
108 | |
109 style.transitionProperty = "20px"; | 111 style.transitionProperty = "20px"; |
110 shouldBe("style.transitionProperty", "''"); | 112 shouldBe("style.transitionProperty", "''"); |
111 shouldBe("computedStyle.transitionProperty", "'all'"); | 113 shouldBe("computedStyle.transitionProperty", "'all'"); |
112 shouldBe("style.webkitTransitionProperty", "''"); | 114 shouldBe("style.webkitTransitionProperty", "''"); |
113 shouldBe("computedStyle.webkitTransitionProperty", "'all'"); | 115 shouldBe("computedStyle.webkitTransitionProperty", "'all'"); |
114 | 116 |
115 style.transitionProperty = "0"; | 117 style.transitionProperty = "0"; |
116 shouldBe("style.transitionProperty", "''"); | 118 shouldBe("style.transitionProperty", "''"); |
117 shouldBe("computedStyle.transitionProperty", "'all'"); | 119 shouldBe("computedStyle.transitionProperty", "'all'"); |
118 shouldBe("style.webkitTransitionProperty", "''"); | 120 shouldBe("style.webkitTransitionProperty", "''"); |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 shouldBe("computedStyle.transition", "'all 0s ease 0s'"); | 659 shouldBe("computedStyle.transition", "'all 0s ease 0s'"); |
658 shouldBe("style.webkitTransition", "''"); | 660 shouldBe("style.webkitTransition", "''"); |
659 shouldBe("computedStyle.webkitTransition", "'all 0s ease 0s'"); | 661 shouldBe("computedStyle.webkitTransition", "'all 0s ease 0s'"); |
660 | 662 |
661 style.transition = "20, 20"; | 663 style.transition = "20, 20"; |
662 shouldBe("style.transition", "''"); | 664 shouldBe("style.transition", "''"); |
663 shouldBe("computedStyle.transition", "'all 0s ease 0s'"); | 665 shouldBe("computedStyle.transition", "'all 0s ease 0s'"); |
664 shouldBe("style.webkitTransition", "''"); | 666 shouldBe("style.webkitTransition", "''"); |
665 shouldBe("computedStyle.webkitTransition", "'all 0s ease 0s'"); | 667 shouldBe("computedStyle.webkitTransition", "'all 0s ease 0s'"); |
666 | 668 |
667 style.transition = "widthFoo"; | |
668 shouldBe("style.transition", "''"); | |
669 shouldBe("computedStyle.transition", "'all 0s ease 0s'"); | |
670 shouldBe("style.webkitTransition", "''"); | |
671 shouldBe("computedStyle.webkitTransition", "'all 0s ease 0s'"); | |
672 | |
673 style.transition = "all 30s width ease-in"; | 669 style.transition = "all 30s width ease-in"; |
674 shouldBe("style.transition", "''"); | 670 shouldBe("style.transition", "''"); |
675 shouldBe("computedStyle.transition", "'all 0s ease 0s'"); | 671 shouldBe("computedStyle.transition", "'all 0s ease 0s'"); |
676 shouldBe("style.webkitTransition", "''"); | 672 shouldBe("style.webkitTransition", "''"); |
677 shouldBe("computedStyle.webkitTransition", "'all 0s ease 0s'"); | 673 shouldBe("computedStyle.webkitTransition", "'all 0s ease 0s'"); |
678 | 674 |
679 style.transition = "all 30s ease-in 20px"; | 675 style.transition = "all 30s ease-in 20px"; |
680 shouldBe("style.transition", "''"); | 676 shouldBe("style.transition", "''"); |
681 shouldBe("computedStyle.transition", "'all 0s ease 0s'"); | 677 shouldBe("computedStyle.transition", "'all 0s ease 0s'"); |
682 shouldBe("style.webkitTransition", "''"); | 678 shouldBe("style.webkitTransition", "''"); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 shouldBe("computedStyle.transition", "'all 0s ease 0s'"); | 719 shouldBe("computedStyle.transition", "'all 0s ease 0s'"); |
724 shouldBe("style.webkitTransition", "''"); | 720 shouldBe("style.webkitTransition", "''"); |
725 shouldBe("computedStyle.webkitTransition", "'all 0s ease 0s'"); | 721 shouldBe("computedStyle.webkitTransition", "'all 0s ease 0s'"); |
726 | 722 |
727 style.transition = "none, none"; | 723 style.transition = "none, none"; |
728 shouldBe("style.transition", "''"); | 724 shouldBe("style.transition", "''"); |
729 shouldBe("computedStyle.transition", "'all 0s ease 0s'"); | 725 shouldBe("computedStyle.transition", "'all 0s ease 0s'"); |
730 shouldBe("style.webkitTransition", "''"); | 726 shouldBe("style.webkitTransition", "''"); |
731 shouldBe("computedStyle.webkitTransition", "'all 0s ease 0s'"); | 727 shouldBe("computedStyle.webkitTransition", "'all 0s ease 0s'"); |
732 | 728 |
| 729 debug("Ambiguous shorthand values."); |
| 730 |
| 731 style.transition = "ease"; |
| 732 shouldBe("style.transitionProperty", "'all'"); |
| 733 shouldBe("style.transitionTimingFunction", "'ease'"); |
| 734 |
| 735 style.transition = "ease-in ease-out"; |
| 736 shouldBe("style.transitionProperty", "'ease-out'"); |
| 737 shouldBe("style.transitionTimingFunction", "'ease-in'"); |
| 738 |
| 739 style.transition = "20s 10s"; |
| 740 shouldBe("style.transitionDelay", "'10s'"); |
| 741 shouldBe("style.transitionDuration", "'20s'"); |
| 742 |
| 743 style.transition = "-10s 10s"; |
| 744 shouldBe("style.transitionDelay", "'-10s'"); |
| 745 shouldBe("style.transitionDuration", "'10s'"); |
| 746 |
733 document.body.removeChild(testContainer); | 747 document.body.removeChild(testContainer); |
734 </script> | 748 </script> |
735 </body> | 749 </body> |
736 </html> | 750 </html> |
OLD | NEW |