Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: third_party/WebKit/LayoutTests/typedcssom/cssPerspective.html

Issue 2867883003: [CSS Typed OM] Delete obsolete number and length classes from Typed OM (Closed)
Patch Set: rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 var calcLength = new CSSCalcLength({px: 10, percent: 3.2}); 8 var calcLength = new CSSCalcValue({px: 10, percent: 3.2});
9 assert_throws(null, function() { new CSSPerspective(calcLength) }); 9 assert_throws(null, function() { new CSSPerspective(calcLength) });
10 }, "Constructor should throw an error for CSSCalcLengths with a percentage type" ); 10 }, "Constructor should throw an error for CSSCalcValues with a percentage type") ;
11 11
12 test(function() { 12 test(function() {
13 var simpleLength = new CSSSimpleLength(10, 'percent'); 13 var simpleLength = new CSSUnitValue(10, 'percent');
14 assert_throws(null, function() { new CSSPerspective(simpleLength) }); 14 assert_throws(null, function() { new CSSPerspective(simpleLength) });
15 }, "Constructor should throw an error for CSSSimpleLengths with a percentage typ e"); 15 }, "Constructor should throw an error for CSSUnitValues with a percentage type") ;
16 16
17 test(function() { 17 test(function() {
18 var simpleLength = new CSSSimpleLength(10, 'px'); 18 var simpleLength = new CSSUnitValue(10, 'px');
19 var calcLength = new CSSCalcLength({px: 10, em: 3.2}); 19 var calcLength = new CSSCalcValue({px: 10, em: 3.2});
20 var perspectiveTransformSimple = new CSSPerspective(simpleLength); 20 var perspectiveTransformSimple = new CSSPerspective(simpleLength);
21 var perspectiveTransformCalc = new CSSPerspective(calcLength); 21 var perspectiveTransformCalc = new CSSPerspective(calcLength);
22 22
23 assert_equals(perspectiveTransformSimple.toString(), 'perspective(10px)'); 23 assert_equals(perspectiveTransformSimple.toString(), 'perspective(10px)');
24 assert_equals(perspectiveTransformCalc.toString(), 'perspective(calc(3.2em + 1 0px))'); 24 assert_equals(perspectiveTransformCalc.toString(), 'perspective(calc(3.2em + 1 0px))');
25 }, "cssText should return a string of form perspective(<CSSLengthValue.cssString ()>)"); 25 }, "cssText should return a string of form perspective(<CSSLengthValue.cssString ()>)");
26 26
27 </script> 27 </script>
28 28
29 <body> 29 <body>
30 </body> 30 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698