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

Unified Diff: third_party/WebKit/LayoutTests/typedcssom/rotationTransformComponent.html

Issue 1589733004: CSS Typed OM: add TransformComponents Rotation and Skew (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cssValueAndCssString
Patch Set: Remove TransformComponent call in child constructor Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/typedcssom/skewTransformComponent.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/typedcssom/rotationTransformComponent.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/rotationTransformComponent.html b/third_party/WebKit/LayoutTests/typedcssom/rotationTransformComponent.html
new file mode 100644
index 0000000000000000000000000000000000000000..a7ec981f0dff2377816e5ed7448d2bb27898a015
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/typedcssom/rotationTransformComponent.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+
+<script>
+var values = [
+ {input: new RotationTransformComponent(0), angle: 0, x: 0, y: 0, z: 1,
+ is2DComponent: true, cssString: "rotate(0deg)"},
+ {input: new RotationTransformComponent(10), angle: 10, x: 0, y: 0, z: 1,
+ is2DComponent: true, cssString: "rotate(10deg)"},
+ {input: new RotationTransformComponent(-21), angle: -21, x: 0, y: 0, z: 1,
+ is2DComponent: true, cssString: "rotate(-21deg)"},
+ {input: new RotationTransformComponent(3.2), angle: 3.2, x: 0, y: 0, z: 1,
+ is2DComponent: true, cssString: "rotate(3.2deg)"},
+ {input: new RotationTransformComponent(10, 0, 0, 1), angle: 10, x: 0, y: 0, z: 1,
+ is2DComponent: false, cssString: "rotate3d(0, 0, 1, 10deg)"},
+ {input: new RotationTransformComponent(10, 2, 3, 4), angle: 10, x: 2, y: 3, z: 4,
+ is2DComponent: false, cssString: "rotate3d(2, 3, 4, 10deg)"},
+ {input: new RotationTransformComponent(-1.2, 2, 3.7, -4), angle: -1.2, x: 2, y: 3.7, z: -4,
+ is2DComponent: false, cssString: "rotate3d(2, 3.7, -4, -1.2deg)"}
+];
+
+test(function() {
+ for (var i = 0; i < values.length; ++i) {
+ assert_equals(values[i].input.angle, values[i].angle);
+ assert_equals(values[i].input.x, values[i].x);
+ assert_equals(values[i].input.y, values[i].y);
+ assert_equals(values[i].input.z, values[i].z);
+ }
+}, "Test that the (angle, x, y, z) values for RotationTransformComponent are correct.");
+
+test(function() {
+ for (var i = 0; i < values.length; ++i) {
+ assert_equals(values[i].input.is2DComponent(), values[i].is2DComponent);
+ }
+}, "Test that the is2DComponent values for RotationTransformComponent is correct.");
+
+test(function() {
+ for (var i = 0; i < values.length; ++i) {
+ assert_equals(values[i].input.cssString, values[i].cssString);
+ }
+}, "Test that cssString values for RotationTransformComponent is correct.");
+
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/typedcssom/skewTransformComponent.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698