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/transformValue.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
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4
5 <script>
6
7 test(function() {
8 var transformValueObject = new TransformValue();
9 assert_true(transformValueObject instanceof TransformValue);
10 assert_true(transformValueObject instanceof CSSStyleValue);
11 }, "A TransformValue object can be constructed");
12
13 test(function() {
14 var transformArray = [new CSSScale(2,2),
15 new CSSMatrix(1,1,1,1,1,1), new CSSScale(5,6)];
16 var transformValue = new TransformValue(transformArray);
17 assert_true(transformValue.is2D());
18 }, "is2D returns true for transformValues containing only 2D transformComponents ");
19
20 test(function() {
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)];
23 var transformValue = new TransformValue(transformArray);
24 assert_false(transformValue.is2D());
25 }, "is2D returns false for transformValues containing both 2D and 3D transformCo mponents");
26
27 test(function() {
28 var transformArray = [new CSSScale(2,2),
29 new CSSMatrix(1,1,1,1,1,1), new CSSScale(5,6)];
30 var transformValue = new TransformValue(transformArray);
31
32 var newTransformArray = [];
33 for (var component of transformValue) {
34 newTransformArray.push(component);
35 }
36 assert_true(newTransformArray.length == 3);
37 assert_true(newTransformArray[0] instanceof CSSScale);
38 assert_true(newTransformArray[1] instanceof CSSMatrix);
39 assert_true(newTransformArray[2] instanceof CSSScale);
40 }, "TransformValue can iterate through all its all its transformComponent member s");
41
42 </script>
43
44 <body>
45 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698