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

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

Issue 2903413002: Restructure type tracking in StyleValues to work better with new numeric types (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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/typedcssom/cssPerspective-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CSSCalcValue({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 CSSCalcValues 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 CSSUnitValue(10, 'percent'); 13 var simpleLength = new CSSUnitValue(10, 'percent');
14 assert_throws(null, function() { new CSSPerspective(simpleLength) }); 14 assert_throws(new TypeError(), function() { new CSSPerspective(simpleLength) } );
15 }, "Constructor should throw an error for CSSUnitValues with a percentage type") ; 15 }, "Constructor should throw an error for CSSUnitValues with a percentage type") ;
16 16
17 test(function() { 17 test(function() {
18 var simpleLength = new CSSUnitValue(10, 'px'); 18 var simpleLength = new CSSUnitValue(10, 'px');
19 var calcLength = new CSSCalcValue({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 }, "toString should return a string of form perspective(<CSSLengthValue.cssStrin g()>)"); 25 }, "toString should return a string of form perspective(<CSSLengthValue.cssStrin g()>)");
26 26
27 </script> 27 </script>
28 28
29 <body> 29 <body>
30 </body> 30 </body>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/typedcssom/cssPerspective-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698