OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../resources/testharness.js"></script> | 2 <script src="../../resources/testharness.js"></script> |
3 <script src="../../resources/testharnessreport.js"></script> | 3 <script src="../../resources/testharnessreport.js"></script> |
4 | 4 |
5 <div id="testElement"></div> | 5 <div id="testElement"></div> |
6 | 6 |
7 <script> | 7 <script> |
8 | 8 |
9 test(function() { | 9 test(function() { |
10 // TODO(meade): Make this a test case for a property with multiple values when
that is supported. | 10 // TODO(meade): Make this a test case for a property with multiple values when
that is supported. |
(...skipping 20 matching lines...) Expand all Loading... |
31 test(function() { | 31 test(function() { |
32 assert_array_equals(testElement.styleMap.getAll('height'), []); | 32 assert_array_equals(testElement.styleMap.getAll('height'), []); |
33 }, "getAll() returns an empty list if the property isn't set"); | 33 }, "getAll() returns an empty list if the property isn't set"); |
34 | 34 |
35 test(function() { | 35 test(function() { |
36 assert_throws(new TypeError(), function() { | 36 assert_throws(new TypeError(), function() { |
37 testElement.styleMap.getAll('lemons'); | 37 testElement.styleMap.getAll('lemons'); |
38 }); | 38 }); |
39 }, "getAll() throws if you try to get an invalid property"); | 39 }, "getAll() throws if you try to get an invalid property"); |
40 | 40 |
| 41 test(function() { |
| 42 testElement.style.animationIterationCount = "infinite, 6.2"; |
| 43 |
| 44 var result = testElement.styleMap.getAll('animation-iteration-count'); |
| 45 assert_equals(result.length, 2); |
| 46 assert_true(result[0] instanceof CSSKeywordValue); |
| 47 assert_true(result[1] instanceof CSSNumberValue); |
| 48 assert_equals(result[0].value, "infinite"); |
| 49 assert_equals(result[1].value, 6.2); |
| 50 }, "getAll() returns a list of mixed types if they are all valid types"); |
| 51 |
41 </script> | 52 </script> |
OLD | NEW |