| 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 // Append | 9 // Append |
| 10 test(function() { | 10 test(function() { |
| 11 assert_throws(new TypeError(), function() { | 11 assert_throws(new TypeError(), function() { |
| 12 testElement.styleMap.append('width', new CSSSimpleLength(60, 'px')); | 12 testElement.styleMap.append('width', new CSSUnitValue(60, 'px')); |
| 13 }); | 13 }); |
| 14 }, "Attempting to append to a property that doesn't support multiple values thro
ws"); | 14 }, "Attempting to append to a property that doesn't support multiple values thro
ws"); |
| 15 | 15 |
| 16 test(function() { | 16 test(function() { |
| 17 // TODO(meade): Use a property that supports multiple values when that is avai
lable. | 17 // TODO(meade): Use a property that supports multiple values when that is avai
lable. |
| 18 assert_throws(new TypeError(), function() { | 18 assert_throws(new TypeError(), function() { |
| 19 testElement.styleMap.append('width', new CSSNumberValue(70)); | 19 testElement.styleMap.append('width', new CSSUnitValue(70, 'number')); |
| 20 }); | 20 }); |
| 21 }, "Appending an invalid type to a property throws"); | 21 }, "Appending an invalid type to a property throws"); |
| 22 | 22 |
| 23 test(function() { | 23 test(function() { |
| 24 assert_throws(new TypeError(), function() { | 24 assert_throws(new TypeError(), function() { |
| 25 testElement.styleMap.append('lemons', new CSSNumberValue(6)); | 25 testElement.styleMap.append('lemons', new CSSUnitValue(6, 'number')); |
| 26 }); | 26 }); |
| 27 }, "Attempting to append to an invalid property throws"); | 27 }, "Attempting to append to an invalid property throws"); |
| 28 | 28 |
| 29 </script> | 29 </script> |
| OLD | NEW |