| 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 <script> | 5 <script> |
| 6 | 6 |
| 7 test(function() { | 7 test(function() { |
| 8 assert_equals(new CSSPositionValue(new CSSSimpleLength(50, 'px'), | 8 assert_equals(new CSSPositionValue(new CSSSimpleLength(50, 'px'), |
| 9 new CSSCalcLength({px: -10, em: -3.2, pt: 0})).cssString, '50px calc((-3.2em
- 10px) + 0pt)'); | 9 new CSSCalcLength({px: -10, em: -3.2, pt: 0})).cssText, '50px calc((-3.2em -
10px) + 0pt)'); |
| 10 assert_equals(new CSSPositionValue(new CSSSimpleLength(50, 'px'), | 10 assert_equals(new CSSPositionValue(new CSSSimpleLength(50, 'px'), |
| 11 new CSSSimpleLength(2, 'em')).cssString, '50px 2em'); | 11 new CSSSimpleLength(2, 'em')).cssText, '50px 2em'); |
| 12 assert_equals(new CSSPositionValue(new CSSCalcLength({px: -10, em: -3.2, pt: 0
}), | 12 assert_equals(new CSSPositionValue(new CSSCalcLength({px: -10, em: -3.2, pt: 0
}), |
| 13 new CSSCalcLength({px: -10, em: 3.2})).cssString, 'calc((-3.2em - 10px) + 0p
t) calc(3.2em - 10px)'); | 13 new CSSCalcLength({px: -10, em: 3.2})).cssText, 'calc((-3.2em - 10px) + 0pt)
calc(3.2em - 10px)'); |
| 14 assert_equals(new CSSPositionValue(new CSSCalcLength({px: -10, em: -3.2, pt: 0
}), | 14 assert_equals(new CSSPositionValue(new CSSCalcLength({px: -10, em: -3.2, pt: 0
}), |
| 15 new CSSSimpleLength(10, 'percent')).cssString, 'calc((-3.2em - 10px) + 0pt)
10%'); | 15 new CSSSimpleLength(10, 'percent')).cssText, 'calc((-3.2em - 10px) + 0pt) 10
%'); |
| 16 }, "cssString returns a string with the x and y positions cssStrings separated b
y a space"); | 16 }, "cssText returns a string with the x and y positions cssStrings separated by
a space"); |
| 17 | 17 |
| 18 </script> | 18 </script> |
| 19 | 19 |
| 20 <body> | 20 <body> |
| 21 </body> | 21 </body> |
| OLD | NEW |