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

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

Issue 2099513002: [Typed OM] Rename TransformValue -> CSSTransformValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename-transformcomponent
Patch Set: sync to head 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 transformValueObject = new TransformValue(); 8 var transformValueObject = new CSSTransformValue();
9 assert_true(transformValueObject instanceof TransformValue); 9 assert_true(transformValueObject instanceof CSSTransformValue);
10 assert_true(transformValueObject instanceof CSSStyleValue); 10 assert_true(transformValueObject instanceof CSSStyleValue);
11 }, "A TransformValue object can be constructed"); 11 }, "A CSSTransformValue object can be constructed");
12 12
13 test(function() { 13 test(function() {
14 var transformArray = [new CSSScale(2,2), 14 var transformArray = [new CSSScale(2,2),
15 new CSSMatrix(1,1,1,1,1,1), new CSSScale(5,6)]; 15 new CSSMatrix(1,1,1,1,1,1), new CSSScale(5,6)];
16 var transformValue = new TransformValue(transformArray); 16 var transformValue = new CSSTransformValue(transformArray);
17 assert_true(transformValue.is2D()); 17 assert_true(transformValue.is2D());
18 }, "is2D returns true for transformValues containing only 2D transformComponents "); 18 }, "is2D returns true for transformValues containing only 2D transformComponents ");
19 19
20 test(function() { 20 test(function() {
21 var transformArray = [new CSSScale(2,2), 21 var transformArray = [new CSSScale(2,2),
22 new CSSMatrix(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1), new CSSScale(5,6)]; 22 new CSSMatrix(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1), new CSSScale(5,6)];
23 var transformValue = new TransformValue(transformArray); 23 var transformValue = new CSSTransformValue(transformArray);
24 assert_false(transformValue.is2D()); 24 assert_false(transformValue.is2D());
25 }, "is2D returns false for transformValues containing both 2D and 3D transformCo mponents"); 25 }, "is2D returns false for transformValues containing both 2D and 3D transformCo mponents");
26 26
27 test(function() { 27 test(function() {
28 var transformArray = [new CSSScale(2,2), 28 var transformArray = [new CSSScale(2,2),
29 new CSSMatrix(1,1,1,1,1,1), new CSSScale(5,6)]; 29 new CSSMatrix(1,1,1,1,1,1), new CSSScale(5,6)];
30 var transformValue = new TransformValue(transformArray); 30 var transformValue = new CSSTransformValue(transformArray);
31 31
32 var newTransformArray = []; 32 var newTransformArray = [];
33 for (var component of transformValue) { 33 for (var component of transformValue) {
34 newTransformArray.push(component); 34 newTransformArray.push(component);
35 } 35 }
36 assert_true(newTransformArray.length == 3); 36 assert_true(newTransformArray.length == 3);
37 assert_true(newTransformArray[0] instanceof CSSScale); 37 assert_true(newTransformArray[0] instanceof CSSScale);
38 assert_true(newTransformArray[1] instanceof CSSMatrix); 38 assert_true(newTransformArray[1] instanceof CSSMatrix);
39 assert_true(newTransformArray[2] instanceof CSSScale); 39 assert_true(newTransformArray[2] instanceof CSSScale);
40 }, "TransformValue can iterate through all its all its transformComponent member s"); 40 }, "CSSTransformValue can iterate through all its all its transformComponent mem bers");
41 41
42 </script> 42 </script>
43 43
44 <body> 44 <body>
45 </body> 45 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698