OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../fast/js/resources/js-test-pre.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 animations pr
operties.") | 8 description("Test the parsing and the computed style values of the animations pr
operties.") |
9 | 9 |
10 var testContainer = document.createElement("div"); | 10 var testContainer = document.createElement("div"); |
11 document.body.appendChild(testContainer); | 11 document.body.appendChild(testContainer); |
12 | 12 |
13 testContainer.innerHTML = '<div style="width:500px;height:500px"><div id="test">
hello</div></div>'; | 13 testContainer.innerHTML = '<div style="width:500px;height:500px"><div id="test">
hello</div></div>'; |
14 | 14 |
15 e = document.getElementById('test'); | 15 e = document.getElementById('test'); |
16 style = e.style; | 16 style = e.style; |
17 computedStyle = window.getComputedStyle(e, null); | 17 computedStyle = window.getComputedStyle(e, null); |
18 | 18 |
19 // This function checks the return value of computedStyle.animation and verifies
Blink can parse it. | 19 // This function checks the return value of computedStyle.animation and verifies
Blink can parse it. |
20 function checkTransitionShorthandValue() { | 20 function checkAnimationShorthandValue() { |
21 var before = computedStyle.getPropertyValue('animation'); | 21 var before = computedStyle.getPropertyValue('animation'); |
22 e.style.animation = ''; | 22 e.style.animation = ''; |
23 e.style.animation = before; | 23 e.style.animation = before; |
24 return (computedStyle.getPropertyValue('animation') == before); | 24 return (computedStyle.getPropertyValue('animation') == before); |
25 } | 25 } |
26 | 26 |
27 debug("Valid animation-name values."); | 27 debug("Valid animation-name values."); |
28 // Initial test. | 28 // Initial test. |
29 shouldBe("computedStyle.animationName", "'none'"); | 29 shouldBe("computedStyle.animationName", "'none'"); |
30 shouldBe("computedStyle.webkitAnimationName", "'none'"); | 30 shouldBe("computedStyle.webkitAnimationName", "'none'"); |
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 shouldBe("computedStyle.animationFillMode", "'none'"); | 808 shouldBe("computedStyle.animationFillMode", "'none'"); |
809 shouldBe("style.webkitAnimationFillMode", "''"); | 809 shouldBe("style.webkitAnimationFillMode", "''"); |
810 shouldBe("computedStyle.webkitAnimationFillMode", "'none'"); | 810 shouldBe("computedStyle.webkitAnimationFillMode", "'none'"); |
811 | 811 |
812 style.animationFillMode = "test, none"; | 812 style.animationFillMode = "test, none"; |
813 shouldBe("style.animationFillMode", "''"); | 813 shouldBe("style.animationFillMode", "''"); |
814 shouldBe("computedStyle.animationFillMode", "'none'"); | 814 shouldBe("computedStyle.animationFillMode", "'none'"); |
815 shouldBe("style.webkitAnimationFillMode", "''"); | 815 shouldBe("style.webkitAnimationFillMode", "''"); |
816 shouldBe("computedStyle.webkitAnimationFillMode", "'none'"); | 816 shouldBe("computedStyle.webkitAnimationFillMode", "'none'"); |
817 | 817 |
818 // FIXME : Add tests for shorthand parsing. | 818 debug("Valid animation shorthand values."); |
819 // https://code.google.com/p/chromium/issues/detail?id=234612 | 819 style.animation = ""; |
| 820 // Initial test. |
| 821 shouldBe("computedStyle.animation", "'none 0s ease 0s 1 normal none running'"); |
| 822 shouldBe("computedStyle.webkitAnimation", "'none 0s ease 0s 1 normal none runnin
g'"); |
| 823 |
| 824 style.animation = "myShorthandAnim"; |
| 825 shouldNotBe("Object.keys(style).indexOf('animation')", "-1"); |
| 826 shouldNotBe("Object.keys(style).indexOf('webkitAnimation')", "-1"); |
| 827 shouldBe("style.animation", "'myShorthandAnim'"); |
| 828 shouldBe("computedStyle.animation", "'myShorthandAnim 0s ease 0s 1 normal none r
unning'"); |
| 829 shouldBe("style.webkitAnimation", "'myShorthandAnim'"); |
| 830 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 0s ease 0s 1 normal
none running'"); |
| 831 shouldBe("checkAnimationShorthandValue()", "true"); |
| 832 |
| 833 style.animation = "none"; |
| 834 shouldNotBe("Object.keys(style).indexOf('animation')", "-1"); |
| 835 shouldNotBe("Object.keys(style).indexOf('webkitAnimation')", "-1"); |
| 836 shouldBe("style.animation", "'none'"); |
| 837 shouldBe("computedStyle.animation", "'none 0s ease 0s 1 normal none running'"); |
| 838 shouldBe("style.webkitAnimation", "'none'"); |
| 839 shouldBe("computedStyle.webkitAnimation", "'none 0s ease 0s 1 normal none runnin
g'"); |
| 840 shouldBe("checkAnimationShorthandValue()", "true"); |
| 841 |
| 842 style.animation = "none 20s"; |
| 843 shouldBe("style.animation", "'20s none'"); |
| 844 shouldBe("computedStyle.animation", "'none 20s ease 0s 1 normal none running'"); |
| 845 shouldBe("style.webkitAnimation", "'20s none'"); |
| 846 shouldBe("computedStyle.webkitAnimation", "'none 20s ease 0s 1 normal none runni
ng'"); |
| 847 shouldBe("checkAnimationShorthandValue()", "true"); |
| 848 |
| 849 style.animation = "myShorthandAnim none 20s"; |
| 850 shouldBe("style.animation", "'myShorthandAnim 20s none'"); |
| 851 shouldBe("computedStyle.animation", "'myShorthandAnim 20s ease 0s 1 normal none
running'"); |
| 852 shouldBe("style.webkitAnimation", "'myShorthandAnim 20s none'"); |
| 853 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 20s ease 0s 1 normal
none running'"); |
| 854 shouldBe("checkAnimationShorthandValue()", "true"); |
| 855 |
| 856 style.animation = "myShorthandAnim ease-in none 20s"; |
| 857 shouldBe("style.animation", "'myShorthandAnim 20s ease-in none'"); |
| 858 shouldBe("computedStyle.animation", "'myShorthandAnim 20s ease-in 0s 1 normal no
ne running'"); |
| 859 shouldBe("style.webkitAnimation", "'myShorthandAnim 20s ease-in none'"); |
| 860 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 20s ease-in 0s 1 nor
mal none running'"); |
| 861 shouldBe("checkAnimationShorthandValue()", "true"); |
| 862 |
| 863 style.animation = "myShorthandAnim ease-in 20s"; |
| 864 shouldBe("style.animation", "'myShorthandAnim 20s ease-in'"); |
| 865 shouldBe("computedStyle.animation", "'myShorthandAnim 20s ease-in 0s 1 normal no
ne running'"); |
| 866 shouldBe("style.webkitAnimation", "'myShorthandAnim 20s ease-in'"); |
| 867 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 20s ease-in 0s 1 nor
mal none running'"); |
| 868 shouldBe("checkAnimationShorthandValue()", "true"); |
| 869 |
| 870 style.animation = "myShorthandAnim ease-in 20s 10s"; |
| 871 shouldBe("style.animation", "'myShorthandAnim 20s ease-in 10s'"); |
| 872 shouldBe("computedStyle.animation", "'myShorthandAnim 20s ease-in 10s 1 normal n
one running'"); |
| 873 shouldBe("style.webkitAnimation", "'myShorthandAnim 20s ease-in 10s'"); |
| 874 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 20s ease-in 10s 1 no
rmal none running'"); |
| 875 // Let's double check here the delay and duration. As stated in the spec the fir
st value parsed |
| 876 // is assigned to the duration. |
| 877 shouldBe("computedStyle.animationDuration", "'20s'"); |
| 878 shouldBe("computedStyle.webkitAnimationDuration", "'20s'"); |
| 879 shouldBe("computedStyle.animationDelay", "'10s'"); |
| 880 shouldBe("computedStyle.webkitAnimationDelay", "'10s'"); |
| 881 shouldBe("checkAnimationShorthandValue()", "true"); |
| 882 |
| 883 style.animation = "myShorthandAnim 20s ease-in 10s"; |
| 884 shouldBe("style.animation", "'myShorthandAnim 20s ease-in 10s'"); |
| 885 shouldBe("computedStyle.animation", "'myShorthandAnim 20s ease-in 10s 1 normal n
one running'"); |
| 886 shouldBe("style.webkitAnimation", "'myShorthandAnim 20s ease-in 10s'"); |
| 887 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 20s ease-in 10s 1 no
rmal none running'"); |
| 888 shouldBe("computedStyle.animationDuration", "'20s'"); |
| 889 shouldBe("computedStyle.webkitAnimationDuration", "'20s'"); |
| 890 shouldBe("computedStyle.animationDelay", "'10s'"); |
| 891 shouldBe("computedStyle.webkitAnimationDelay", "'10s'"); |
| 892 shouldBe("checkAnimationShorthandValue()", "true"); |
| 893 |
| 894 style.animation = "myShorthandAnim paused 20s ease-in 10s"; |
| 895 shouldBe("style.animation", "'myShorthandAnim 20s ease-in 10s paused'"); |
| 896 shouldBe("computedStyle.animation", "'myShorthandAnim 20s ease-in 10s 1 normal n
one paused'"); |
| 897 shouldBe("style.webkitAnimation", "'myShorthandAnim 20s ease-in 10s paused'"); |
| 898 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 20s ease-in 10s 1 no
rmal none paused'"); |
| 899 shouldBe("computedStyle.animationDuration", "'20s'"); |
| 900 shouldBe("computedStyle.webkitAnimationDuration", "'20s'"); |
| 901 shouldBe("computedStyle.animationDelay", "'10s'"); |
| 902 shouldBe("computedStyle.webkitAnimationDelay", "'10s'"); |
| 903 shouldBe("checkAnimationShorthandValue()", "true"); |
| 904 |
| 905 style.animation = "myShorthandAnim ease-in both 20s 5"; |
| 906 shouldBe("style.animation", "'myShorthandAnim 20s ease-in 5 both'"); |
| 907 shouldBe("computedStyle.animation", "'myShorthandAnim 20s ease-in 0s 5 normal bo
th running'"); |
| 908 shouldBe("style.webkitAnimation", "'myShorthandAnim 20s ease-in 5 both'"); |
| 909 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 20s ease-in 0s 5 nor
mal both running'"); |
| 910 shouldBe("checkAnimationShorthandValue()", "true"); |
| 911 |
| 912 style.animation = "myShorthandAnim ease-in 20s 5 backwards"; |
| 913 shouldBe("style.animation", "'myShorthandAnim 20s ease-in 5 backwards'"); |
| 914 shouldBe("computedStyle.animation", "'myShorthandAnim 20s ease-in 0s 5 normal ba
ckwards running'"); |
| 915 shouldBe("style.webkitAnimation", "'myShorthandAnim 20s ease-in 5 backwards'"); |
| 916 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 20s ease-in 0s 5 nor
mal backwards running'"); |
| 917 shouldBe("checkAnimationShorthandValue()", "true"); |
| 918 |
| 919 style.animation = "myShorthandAnim forwards 20s 5"; |
| 920 shouldBe("style.animation", "'myShorthandAnim 20s 5 forwards'"); |
| 921 shouldBe("computedStyle.animation", "'myShorthandAnim 20s ease 0s 5 normal forwa
rds running'"); |
| 922 shouldBe("style.webkitAnimation", "'myShorthandAnim 20s 5 forwards'"); |
| 923 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 20s ease 0s 5 normal
forwards running'"); |
| 924 shouldBe("checkAnimationShorthandValue()", "true"); |
| 925 |
| 926 style.animation = "myShorthandAnim ease-in 20s 5"; |
| 927 shouldBe("style.animation", "'myShorthandAnim 20s ease-in 5'"); |
| 928 shouldBe("computedStyle.animation", "'myShorthandAnim 20s ease-in 0s 5 normal no
ne running'"); |
| 929 shouldBe("style.webkitAnimation", "'myShorthandAnim 20s ease-in 5'"); |
| 930 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 20s ease-in 0s 5 nor
mal none running'"); |
| 931 shouldBe("checkAnimationShorthandValue()", "true"); |
| 932 |
| 933 style.animation = "myShorthandAnim reverse ease-in 20s 5"; |
| 934 shouldBe("style.animation", "'myShorthandAnim 20s ease-in 5 reverse'"); |
| 935 shouldBe("computedStyle.animation", "'myShorthandAnim 20s ease-in 0s 5 reverse n
one running'"); |
| 936 shouldBe("style.webkitAnimation", "'myShorthandAnim 20s ease-in 5 reverse'"); |
| 937 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 20s ease-in 0s 5 rev
erse none running'"); |
| 938 shouldBe("checkAnimationShorthandValue()", "true"); |
| 939 |
| 940 // FIXME : https://code.google.com/p/chromium/issues/detail?id=273092 |
| 941 /*style.animation = "ease-in ease-out 5s"; |
| 942 shouldBe("style.animation", "'ease-in ease-out 5s'"); |
| 943 shouldBe("computedStyle.animation", "'ease-in 0s ease-out 0s 1 normal none runni
ng'"); |
| 944 shouldBe("style.webkitAnimation", "'ease-in ease-out 5s'"); |
| 945 shouldBe("computedStyle.webkitAnimation", "'ease-in 0s ease-out 0s 1 normal none
running'"); |
| 946 shouldBe("computedStyle.animationName", "'ease-in'");*/ |
| 947 |
| 948 style.animation = "myShorthandAnim reverse ease-in backwards 20s 5 paused"; |
| 949 shouldBe("style.animation", "'myShorthandAnim 20s ease-in 5 reverse backwards pa
used'"); |
| 950 shouldBe("computedStyle.animation", "'myShorthandAnim 20s ease-in 0s 5 reverse b
ackwards paused'"); |
| 951 shouldBe("style.webkitAnimation", "'myShorthandAnim 20s ease-in 5 reverse backwa
rds paused'"); |
| 952 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 20s ease-in 0s 5 rev
erse backwards paused'"); |
| 953 shouldBe("checkAnimationShorthandValue()", "true"); |
| 954 |
| 955 style.animation = "myShorthandAnim ease-in 20s 10s, width cubic-bezier(0.32, 0,
1, 1) 10s 20s"; |
| 956 shouldBe("style.animation", "'myShorthandAnim 20s ease-in 10s, width 10s cubic-b
ezier(0.32, 0, 1, 1) 20s'"); |
| 957 shouldBe("computedStyle.animation", "'myShorthandAnim 20s ease-in 10s 1 normal n
one running, width 10s cubic-bezier(0.32, 0, 1, 1) 20s 1 normal none running'"); |
| 958 shouldBe("style.webkitAnimation", "'myShorthandAnim 20s ease-in 10s, width 10s c
ubic-bezier(0.32, 0, 1, 1) 20s'"); |
| 959 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 20s ease-in 10s 1 no
rmal none running, width 10s cubic-bezier(0.32, 0, 1, 1) 20s 1 normal none runni
ng'"); |
| 960 // Let's double check here the delay and duration. As stated in the spec the fir
st value parsed |
| 961 // is assigned to the duration. |
| 962 shouldBe("computedStyle.animationDuration", "'20s, 10s'"); |
| 963 shouldBe("computedStyle.webkitAnimationDuration", "'20s, 10s'"); |
| 964 shouldBe("computedStyle.animationDelay", "'10s, 20s'"); |
| 965 shouldBe("computedStyle.webkitAnimationDelay", "'10s, 20s'"); |
| 966 shouldBe("checkAnimationShorthandValue()", "true"); |
| 967 |
| 968 style.animation = "myShorthandAnim ease-in 20s 10s paused, width cubic-bezier(0.
32, 0, 1, 1) 10s 20s"; |
| 969 shouldBe("style.animation", "'myShorthandAnim 20s ease-in 10s paused, width 10s
cubic-bezier(0.32, 0, 1, 1) 20s'"); |
| 970 shouldBe("computedStyle.animation", "'myShorthandAnim 20s ease-in 10s 1 normal n
one paused, width 10s cubic-bezier(0.32, 0, 1, 1) 20s 1 normal none running'"); |
| 971 shouldBe("style.webkitAnimation", "'myShorthandAnim 20s ease-in 10s paused, widt
h 10s cubic-bezier(0.32, 0, 1, 1) 20s'"); |
| 972 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 20s ease-in 10s 1 no
rmal none paused, width 10s cubic-bezier(0.32, 0, 1, 1) 20s 1 normal none runnin
g'"); |
| 973 // Let's double check here the delay and duration. As stated in the spec the fir
st value parsed |
| 974 // is assigned to the duration. |
| 975 shouldBe("computedStyle.animationDuration", "'20s, 10s'"); |
| 976 shouldBe("computedStyle.webkitAnimationDuration", "'20s, 10s'"); |
| 977 shouldBe("computedStyle.animationDelay", "'10s, 20s'"); |
| 978 shouldBe("computedStyle.webkitAnimationDelay", "'10s, 20s'"); |
| 979 shouldBe("checkAnimationShorthandValue()", "true"); |
| 980 |
| 981 style.animation = "myShorthandAnim reverse ease-in 20s 10s paused, test cubic-be
zier(0.32, 0, 1, 1) 10s 20s both"; |
| 982 shouldBe("style.animation", "'myShorthandAnim 20s ease-in 10s reverse paused, te
st 10s cubic-bezier(0.32, 0, 1, 1) 20s both'"); |
| 983 shouldBe("computedStyle.animation", "'myShorthandAnim 20s ease-in 10s 1 reverse
none paused, test 10s cubic-bezier(0.32, 0, 1, 1) 20s 1 normal both running'"); |
| 984 shouldBe("style.webkitAnimation", "'myShorthandAnim 20s ease-in 10s reverse paus
ed, test 10s cubic-bezier(0.32, 0, 1, 1) 20s both'"); |
| 985 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 20s ease-in 10s 1 re
verse none paused, test 10s cubic-bezier(0.32, 0, 1, 1) 20s 1 normal both runnin
g'"); |
| 986 shouldBe("checkAnimationShorthandValue()", "true"); |
| 987 |
| 988 style.animation = "none, none"; |
| 989 shouldBe("style.animation", "'none, none'"); |
| 990 shouldBe("computedStyle.animation", "'none 0s ease 0s 1 normal none running, non
e 0s ease 0s 1 normal none running'"); |
| 991 shouldBe("style.webkitAnimation", "'none, none'"); |
| 992 shouldBe("computedStyle.webkitAnimation", "'none 0s ease 0s 1 normal none runnin
g, none 0s ease 0s 1 normal none running'"); |
| 993 |
| 994 style.animation = "ease-in test 20s 10s, none"; |
| 995 shouldBe("style.animation", "'test 20s ease-in 10s, none'"); |
| 996 shouldBe("computedStyle.animation", "'test 20s ease-in 10s 1 normal none running
, none 0s ease 0s 1 normal none running'"); |
| 997 shouldBe("style.webkitAnimation", "'test 20s ease-in 10s, none'"); |
| 998 shouldBe("computedStyle.webkitAnimation", "'test 20s ease-in 10s 1 normal none r
unning, none 0s ease 0s 1 normal none running'"); |
| 999 shouldBe("computedStyle.animationName", "'test, none'"); |
| 1000 |
| 1001 style.animation = "none, ease-in test 20s 10s"; |
| 1002 shouldBe("style.animation", "'none, test 20s ease-in 10s'"); |
| 1003 shouldBe("computedStyle.animation", "'none 0s ease 0s 1 normal none running, tes
t 20s ease-in 10s 1 normal none running'"); |
| 1004 shouldBe("style.webkitAnimation", "'none, test 20s ease-in 10s'"); |
| 1005 shouldBe("computedStyle.webkitAnimation", "'none 0s ease 0s 1 normal none runnin
g, test 20s ease-in 10s 1 normal none running'"); |
| 1006 shouldBe("computedStyle.animationName", "'none, test'"); |
| 1007 |
| 1008 style.animation = "myShorthandAnim both 20s 10s ease-in paused, myShorthandAnim
ease-out 20s"; |
| 1009 shouldBe("style.animation", "'myShorthandAnim 20s ease-in 10s both paused, mySho
rthandAnim 20s ease-out'"); |
| 1010 shouldBe("computedStyle.animation", "'myShorthandAnim 20s ease-in 10s 1 normal b
oth paused, myShorthandAnim 20s ease-out 0s 1 normal none running'"); |
| 1011 shouldBe("style.webkitAnimation", "'myShorthandAnim 20s ease-in 10s both paused,
myShorthandAnim 20s ease-out'"); |
| 1012 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 20s ease-in 10s 1 no
rmal both paused, myShorthandAnim 20s ease-out 0s 1 normal none running'"); |
| 1013 |
| 1014 style.animation = "myShorthandAnim ease-in 4 20s 10s backwards, myShorthandAnim2
50 ease-out 20s"; |
| 1015 shouldBe("style.animation", "'myShorthandAnim 20s ease-in 10s 4 backwards, mySho
rthandAnim2 20s ease-out 50'"); |
| 1016 shouldBe("computedStyle.animation", "'myShorthandAnim 20s ease-in 10s 4 normal b
ackwards running, myShorthandAnim2 20s ease-out 0s 50 normal none running'"); |
| 1017 shouldBe("style.webkitAnimation", "'myShorthandAnim 20s ease-in 10s 4 backwards,
myShorthandAnim2 20s ease-out 50'"); |
| 1018 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim 20s ease-in 10s 4 no
rmal backwards running, myShorthandAnim2 20s ease-out 0s 50 normal none running'
"); |
| 1019 shouldBe("checkAnimationShorthandValue()", "true"); |
| 1020 |
| 1021 style.animation = "myShorthandAnim2 reverse ease-out 20s, ease-in myShorthandAni
m 20s 10s paused"; |
| 1022 shouldBe("style.animation", "'myShorthandAnim2 20s ease-out reverse, myShorthand
Anim 20s ease-in 10s paused'"); |
| 1023 shouldBe("computedStyle.animation", "'myShorthandAnim2 20s ease-out 0s 1 reverse
none running, myShorthandAnim 20s ease-in 10s 1 normal none paused'"); |
| 1024 shouldBe("style.webkitAnimation", "'myShorthandAnim2 20s ease-out reverse, mySho
rthandAnim 20s ease-in 10s paused'"); |
| 1025 shouldBe("computedStyle.webkitAnimation", "'myShorthandAnim2 20s ease-out 0s 1 r
everse none running, myShorthandAnim 20s ease-in 10s 1 normal none paused'"); |
| 1026 shouldBe("checkAnimationShorthandValue()", "true"); |
| 1027 |
| 1028 debug("Invalid animation shorthand values."); |
| 1029 style.animation = ""; |
| 1030 |
| 1031 style.animation = "solid red"; |
| 1032 shouldBe("style.animation", "''"); |
| 1033 shouldBe("computedStyle.animation", "'none 0s ease 0s 1 normal none running'"); |
| 1034 shouldBe("style.webkitAnimation", "''"); |
| 1035 shouldBe("computedStyle.webkitAnimation", "'none 0s ease 0s 1 normal none runnin
g'"); |
| 1036 |
| 1037 style.animation = "all 30s width ease-in"; |
| 1038 shouldBe("style.animation", "''"); |
| 1039 shouldBe("computedStyle.animation", "'none 0s ease 0s 1 normal none running'"); |
| 1040 shouldBe("style.webkitAnimation", "''"); |
| 1041 shouldBe("computedStyle.webkitAnimation", "'none 0s ease 0s 1 normal none runnin
g'"); |
| 1042 |
| 1043 style.animation = "animName 30s ease-in 20s, 20px"; |
| 1044 shouldBe("style.animation", "''"); |
| 1045 shouldBe("computedStyle.animation", "'none 0s ease 0s 1 normal none running'"); |
| 1046 shouldBe("style.webkitAnimation", "''"); |
| 1047 shouldBe("computedStyle.webkitAnimation", "'none 0s ease 0s 1 normal none runnin
g'"); |
| 1048 |
| 1049 style.animation = "test 30s ease-in 20s, step-start(2)"; |
| 1050 shouldBe("style.animation", "''"); |
| 1051 shouldBe("computedStyle.animation", "'none 0s ease 0s 1 normal none running'"); |
| 1052 shouldBe("style.webkitAnimation", "''"); |
| 1053 shouldBe("computedStyle.webkitAnimation", "'none 0s ease 0s 1 normal none runnin
g'"); |
| 1054 |
| 1055 style.animation = "ease-in opacity 20s 10s myAnim, none"; |
| 1056 shouldBe("style.animation", "''"); |
| 1057 shouldBe("computedStyle.animation", "'none 0s ease 0s 1 normal none running'"); |
| 1058 shouldBe("style.webkitAnimation", "''"); |
| 1059 shouldBe("computedStyle.webkitAnimation", "'none 0s ease 0s 1 normal none runnin
g'"); |
| 1060 |
| 1061 style.animation = "none, ease-in opacity 20s 10s myAnim"; |
| 1062 shouldBe("style.animation", "''"); |
| 1063 shouldBe("computedStyle.animation", "'none 0s ease 0s 1 normal none running'"); |
| 1064 shouldBe("style.webkitAnimation", "''"); |
| 1065 shouldBe("computedStyle.webkitAnimation", "'none 0s ease 0s 1 normal none runnin
g'"); |
| 1066 |
| 1067 // FIXME : https://code.google.com/p/chromium/issues/detail?id=273092 |
| 1068 /*style.animation = "ease-in ease-otu 5s"; |
| 1069 shouldBe("style.animation", "''"); |
| 1070 shouldBe("computedStyle.animation", "'none 0s ease 0s 1 normal none running'"); |
| 1071 shouldBe("style.webkitAnimation", "''"); |
| 1072 shouldBe("computedStyle.webkitAnimation", "'none 0s ease 0s 1 normal none runnin
g'");*/ |
820 | 1073 |
821 document.body.removeChild(testContainer); | 1074 document.body.removeChild(testContainer); |
822 </script> | 1075 </script> |
823 <script src="../fast/js/resources/js-test-post.js"></script> | 1076 <script src="../fast/js/resources/js-test-post.js"></script> |
824 </body> | 1077 </body> |
825 </html> | 1078 </html> |
OLD | NEW |