| 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 var computedStyleMap = getComputedStyleMap(testElement); | 9 var computedStyleMap = getComputedStyleMap(testElement); |
| 10 | 10 |
| 11 test(function() { | 11 test(function() { |
| 12 testElement.style.borderTop = '10px solid #000'; | 12 testElement.style.borderTop = '10px solid #000'; |
| 13 | 13 |
| 14 var result = computedStyleMap.get('border-top-width'); | 14 var result = computedStyleMap.get('border-top-width'); |
| 15 assert_true(result instanceof CSSSimpleLength); | 15 assert_true(result instanceof CSSSimpleLength); |
| 16 assert_equals(result.cssString, '10px'); | 16 assert_equals(result.cssText, '10px'); |
| 17 }, "Getting a 10px border-top-width returns a CSSSimpleLength"); | 17 }, "Getting a 10px border-top-width returns a CSSSimpleLength"); |
| 18 | 18 |
| 19 test(function() { | 19 test(function() { |
| 20 testElement.style.borderTop = '20px solid #000'; | 20 testElement.style.borderTop = '20px solid #000'; |
| 21 | 21 |
| 22 var result = computedStyleMap.getAll('border-top-width'); | 22 var result = computedStyleMap.getAll('border-top-width'); |
| 23 assert_equals(result.length, 1); | 23 assert_equals(result.length, 1); |
| 24 assert_equals(result[0].cssString, '20px'); | 24 assert_equals(result[0].cssText, '20px'); |
| 25 }, "getAll for border-top-width returns a single value"); | 25 }, "getAll for border-top-width returns a single value"); |
| 26 | 26 |
| 27 </script> | 27 </script> |
| OLD | NEW |