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

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

Issue 1648853002: Typed CSS OM: implement TransformComponent::asMatrix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@asMatrixTransformMethod
Patch Set: Use TransformationMatrix::create Created 4 years, 10 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/rotationTransformComponent.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/typedcssom/matrixTransformComponent.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/matrixTransformComponent.html b/third_party/WebKit/LayoutTests/typedcssom/matrixTransformComponent.html
index 084f68056177ef6a5b29ec2d65d91daf29cd75df..cf553add8d14e0f021a7a37078e6b694b05d6944 100644
--- a/third_party/WebKit/LayoutTests/typedcssom/matrixTransformComponent.html
+++ b/third_party/WebKit/LayoutTests/typedcssom/matrixTransformComponent.html
@@ -27,13 +27,14 @@ var values = [
{input: new Matrix(1.1, 1.2, -13, -1.4, 2, 0, -2, 4, 3.1, 3, 3, 3.4, -4.1, 42, 43, 4.4),
m11: 1.1, m12: 1.2, m13: -13, m14: -1.4, m21: 2, m22: 0, m23: -2, m24: 4,
m31: 3.1, m32: 3, m33: 3, m34: 3.4, m41: -4.1, m42: 42, m43: 43, m44: 4.4,
- is2DComponent: false, cssString: "matrix3d(1.1, 1.2, -13, -1.4, 2, 0, -2, 4, 3.1, 3, 3, 3.4, -4.1, 42, 43, 4.4)"},
+ is2DComponent: false, cssString: "matrix3d(1.1, 1.2, -13, -1.4, 2, 0, -2, 4, 3.1, 3, 3, 3.4, -4.1, 42, 43, 4.4)"}
];
+var attributeValues2D = ["a", "b", "c", "d", "e", "f"];
+var attributeValues3D = ["m11", "m12", "m13", "m14", "m21", "m22", "m23", "m24",
+ "m31", "m32", "m33", "m34", "m41", "m42", "m43", "m44"];
+
test(function() {
- var attributeValues2D = ["a", "b", "c", "d", "e", "f"];
- var attributeValues3D = ["m11", "m12", "m13", "m14", "m21", "m22", "m23", "m24",
- "m31", "m32", "m33", "m34", "m41", "m42", "m43", "m44"];
for (var i = 0; i < values.length; ++i) {
var attributeValues = values[i].is2DComponent ? attributeValues2D : attributeValues3D;
for (var j = 0; j < attributeValues.length; ++j) {
@@ -63,7 +64,17 @@ test(function() {
assert_throws(null, function() { new Matrix(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14); });
}, "Test that invalid number of arguments for Matrix throws an exception.");
-</script>
+test(function() {
+ var attributeValues = attributeValues2D.concat(attributeValues3D);
+ for (var i = 0; i < values.length; ++i) {
+ var inputAsMatrix = values[i].input.asMatrix();
+ for (var j = 0; j < attributeValues.length; ++j) {
+ var attribute = attributeValues[j];
+ assert_equals(inputAsMatrix[attribute], values[i].input[attribute]);
+ }
+ assert_equals(inputAsMatrix.is2DComponent(), values[i].input.is2DComponent());
+ assert_equals(inputAsMatrix.cssString, values[i].input.cssString);
+ }
+}, "Test that asMatrix has all the same properties as the original Matrix.");
-<body>
-</body>
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/typedcssom/rotationTransformComponent.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698