OLD | NEW |
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
2 "http://www.w3.org/TR/html4/loose.dtd"> | 2 "http://www.w3.org/TR/html4/loose.dtd"> |
3 | 3 |
4 <html lang="en"> | 4 <html lang="en"> |
5 <head> | 5 <head> |
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
7 <script src="../resources/js-test.js"></script> | 7 <script src="../resources/js-test.js"></script> |
8 <style type="text/css" media="screen"> | 8 <style type="text/css" media="screen"> |
9 #test { | 9 #test { |
10 position: absolute; | 10 position: absolute; |
(...skipping 23 matching lines...) Expand all Loading... |
34 lastSheet.insertRule("@-webkit-keyframes anim { from { left: 200px; } to { left:
300px;} }", lastSheet.cssRules.length); | 34 lastSheet.insertRule("@-webkit-keyframes anim { from { left: 200px; } to { left:
300px;} }", lastSheet.cssRules.length); |
35 | 35 |
36 var keyframeRule = lastSheet.cssRules[lastSheet.cssRules.length - 1]; | 36 var keyframeRule = lastSheet.cssRules[lastSheet.cssRules.length - 1]; |
37 shouldBeEqualToString("keyframeRule.toString()", "[object CSSKeyframesRule]"); | 37 shouldBeEqualToString("keyframeRule.toString()", "[object CSSKeyframesRule]"); |
38 shouldBe("keyframeRule.type", "7"); | 38 shouldBe("keyframeRule.type", "7"); |
39 shouldBeEqualToString("keyframeRule.name", "anim"); | 39 shouldBeEqualToString("keyframeRule.name", "anim"); |
40 shouldBeEqualToString("keyframeRule.findRule('from').cssText", "0% { left: 200px
; }"); | 40 shouldBeEqualToString("keyframeRule.findRule('from').cssText", "0% { left: 200px
; }"); |
41 shouldBeEqualToString("keyframeRule.findRule('to').cssText", "100% { left: 300px
; }"); | 41 shouldBeEqualToString("keyframeRule.findRule('to').cssText", "100% { left: 300px
; }"); |
42 keyframeRule.deleteRule("from"); | 42 keyframeRule.deleteRule("from"); |
43 shouldBeNull("keyframeRule.findRule('from')"); | 43 shouldBeNull("keyframeRule.findRule('from')"); |
44 keyframeRule.insertRule("from { left: 200px; }"); | 44 keyframeRule.appendRule("from { left: 200px; }"); |
45 shouldBeEqualToString("keyframeRule.findRule('from').cssText", "0% { left: 200px
; }"); | 45 shouldBeEqualToString("keyframeRule.findRule('from').cssText", "0% { left: 200px
; }"); |
46 shouldBeEqualToString("keyframeRule.cssRules[0].toString()", "[object CSSKeyfram
eRule]"); | 46 shouldBeEqualToString("keyframeRule.cssRules[0].toString()", "[object CSSKeyfram
eRule]"); |
47 shouldBeEqualToString("keyframeRule.cssRules[0].cssText", "100% { left: 300px; }
"); | 47 shouldBeEqualToString("keyframeRule.cssRules[0].cssText", "100% { left: 300px; }
"); |
48 shouldBeEqualToString("keyframeRule.cssRules[0].keyText", "100%"); | 48 shouldBeEqualToString("keyframeRule.cssRules[0].keyText", "100%"); |
49 shouldBeEqualToString("keyframeRule.cssRules[0].style.cssText", "left: 300px;"); | 49 shouldBeEqualToString("keyframeRule.cssRules[0].style.cssText", "left: 300px;"); |
50 shouldBeEqualToString("keyframeRule.cssRules[1].toString()", "[object CSSKeyfram
eRule]"); | 50 shouldBeEqualToString("keyframeRule.cssRules[1].toString()", "[object CSSKeyfram
eRule]"); |
51 shouldBeEqualToString("keyframeRule.cssRules[1].cssText", "0% { left: 200px; }")
; | 51 shouldBeEqualToString("keyframeRule.cssRules[1].cssText", "0% { left: 200px; }")
; |
52 shouldBeEqualToString("keyframeRule.cssRules[1].keyText", "0%"); | 52 shouldBeEqualToString("keyframeRule.cssRules[1].keyText", "0%"); |
53 shouldBeEqualToString("keyframeRule.cssRules[1].style.cssText", "left: 200px;"); | 53 shouldBeEqualToString("keyframeRule.cssRules[1].style.cssText", "left: 200px;"); |
54 | 54 |
55 shouldThrow("new CSSKeyframesRule().name", "'TypeError: Illegal constructor'"); | 55 shouldThrow("new CSSKeyframesRule().name", "'TypeError: Illegal constructor'"); |
56 | 56 |
57 document.body.removeChild(testContainer); | 57 document.body.removeChild(testContainer); |
58 </script> | 58 </script> |
59 </body> | 59 </body> |
60 </html> | 60 </html> |
OLD | NEW |