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

Unified Diff: third_party/WebKit/LayoutTests/typedcssom/skewTransformComponent.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
Index: third_party/WebKit/LayoutTests/typedcssom/skewTransformComponent.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/skewTransformComponent.html b/third_party/WebKit/LayoutTests/typedcssom/skewTransformComponent.html
new file mode 100644
index 0000000000000000000000000000000000000000..0ce82abe94bcb3fb6b9d886facd48d9ed852e2a1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/typedcssom/skewTransformComponent.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+
+<script>
+var values = [
+ {input: new SkewTransformComponent(0, 0), ax: 0, ay: 0, cssString: "skew(0, 0)"},
+ {input: new SkewTransformComponent(1, 2), ax: 1, ay: 2, cssString: "skew(1, 2)"},
+ {input: new SkewTransformComponent(-2, -4), ax: -2, ay: -4, cssString: "skew(-2, -4)"},
+ {input: new SkewTransformComponent(3.4, 2.7), ax: 3.4, ay: 2.7, cssString: "skew(3.4, 2.7)"}
+];
+
+test(function() {
+ for (var i = 0; i < values.length; ++i) {
+ assert_equals(values[i].input.ax, values[i].ax);
+ assert_equals(values[i].input.ay, values[i].ay);
+ }
+}, "Test that the (ax, ay) values for SkewTransformComponent are correct.");
+
+test(function() {
+ for (var i = 0; i < values.length; ++i) {
+ assert_true(values[i].input.is2DComponent());
+ }
+}, "Test that the is2DComponent values for SkewTransformComponent is correct.");
+
+test(function() {
+ for (var i = 0; i < values.length; ++i) {
+ assert_equals(values[i].input.cssString, values[i].cssString);
+ }
+}, "Test that the cssString for SkewTransformComponent is correct.");
+
+test(function() {
+ assert_throws(null, function() { new SkewTransformComponent(); });
+ assert_throws(null, function() { new SkewTransformComponent(1); });
+}, "Test that invalid number of arguments for SkewTransformComponent throws an exception.");
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698