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

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

Issue 2097093002: [Typed OM] Rename cssString methods to cssText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename-transformvalue
Patch Set: Update usage in csspaint logging for tests Created 4 years, 5 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 CSSCalcLength({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 CSSCalcLengths with a percentage type" );
11 11
12 test(function() { 12 test(function() {
13 var simpleLength = new CSSSimpleLength(10, 'percent'); 13 var simpleLength = new CSSSimpleLength(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 CSSSimpleLengths with a percentage typ e");
16 16
17 test(function() { 17 test(function() {
18 var simpleLength = new CSSSimpleLength(10, 'px'); 18 var simpleLength = new CSSSimpleLength(10, 'px');
19 var calcLength = new CSSCalcLength({px: 10, em: 3.2}); 19 var calcLength = new CSSCalcLength({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.cssString, 'perspective(10px)'); 23 assert_equals(perspectiveTransformSimple.cssText, 'perspective(10px)');
24 assert_equals(perspectiveTransformCalc.cssString,'perspective(calc(3.2em + 10p x))'); 24 assert_equals(perspectiveTransformCalc.cssText,'perspective(calc(3.2em + 10px) )');
25 }, "cssString should return a string of form perspective(<CSSLengthValue.cssStri ng()>)"); 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