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

Unified Diff: LayoutTests/fast/dom/geometry-interfaces-dom-matrix.html

Issue 460573004: Use resources/testharness.js for geometry-interfaces-dom-matrix test (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use testharnessreport.js Created 6 years, 4 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 | LayoutTests/fast/dom/geometry-interfaces-dom-matrix-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/geometry-interfaces-dom-matrix.html
diff --git a/LayoutTests/fast/dom/geometry-interfaces-dom-matrix.html b/LayoutTests/fast/dom/geometry-interfaces-dom-matrix.html
index db3bbd4c8008f5f0689d4648d404c050125e3c4c..f394c57d40b7fa85fa610fefe4f3edc1b449166a 100644
--- a/LayoutTests/fast/dom/geometry-interfaces-dom-matrix.html
+++ b/LayoutTests/fast/dom/geometry-interfaces-dom-matrix.html
@@ -2,114 +2,111 @@
<html>
<head>
<title>Geometry Interfaces: DOMMatrix</title>
-<script src="../../resources/js-test.js"></script>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
</head>
<body>
<script>
-debug("# DOMMatrix()");
-var matrix = new DOMMatrix();
-shouldBe("matrix.a", "matrix.m11");
-shouldBe("matrix.b", "matrix.m12");
-shouldBe("matrix.c", "matrix.m21");
-shouldBe("matrix.d", "matrix.m22");
-shouldBe("matrix.e", "matrix.m41");
-shouldBe("matrix.f", "matrix.m42");
-shouldBe("matrix.m11", "1");
-shouldBe("matrix.m12", "0");
-shouldBe("matrix.m13", "0");
-shouldBe("matrix.m14", "0");
-shouldBe("matrix.m21", "0");
-shouldBe("matrix.m22", "1");
-shouldBe("matrix.m23", "0");
-shouldBe("matrix.m24", "0");
-shouldBe("matrix.m31", "0");
-shouldBe("matrix.m32", "0");
-shouldBe("matrix.m33", "1");
-shouldBe("matrix.m34", "0");
-shouldBe("matrix.m41", "0");
-shouldBe("matrix.m42", "0");
-shouldBe("matrix.m43", "0");
-shouldBe("matrix.m44", "1");
-shouldBeTrue("matrix.is2D");
-shouldBeTrue("matrix.isIdentity");
-debug("");
+test(function() {
+ var matrix = new DOMMatrix();
+ assert_equals(matrix.m11, 1);
+ assert_equals(matrix.m12, 0);
+ assert_equals(matrix.m13, 0);
+ assert_equals(matrix.m14, 0);
+ assert_equals(matrix.m21, 0);
+ assert_equals(matrix.m22, 1);
+ assert_equals(matrix.m23, 0);
+ assert_equals(matrix.m24, 0);
+ assert_equals(matrix.m31, 0);
+ assert_equals(matrix.m32, 0);
+ assert_equals(matrix.m33, 1);
+ assert_equals(matrix.m34, 0);
+ assert_equals(matrix.m41, 0);
+ assert_equals(matrix.m42, 0);
+ assert_equals(matrix.m43, 0);
+ assert_equals(matrix.m44, 1);
+ assert_true(matrix.is2D);
+ assert_true(matrix.isIdentity);
+}, "DOMMatrix() constructor");
-debug("# DOMMatrix set attributes");
-matrix.a = 10;
-matrix.b = 20;
-matrix.m24 = 2;
-matrix.m33 = 3;
-matrix.m42 = 3;
-matrix.m44 = 9;
-shouldBe("matrix.a", "matrix.m11");
-shouldBe("matrix.b", "matrix.m12");
-shouldBe("matrix.c", "matrix.m21");
-shouldBe("matrix.d", "matrix.m22");
-shouldBe("matrix.e", "matrix.m41");
-shouldBe("matrix.f", "matrix.m42");
-shouldBe("matrix.m11", "10");
-shouldBe("matrix.m12", "20");
-shouldBe("matrix.m13", "0");
-shouldBe("matrix.m14", "0");
-shouldBe("matrix.m21", "0");
-shouldBe("matrix.m22", "1");
-shouldBe("matrix.m23", "0");
-shouldBe("matrix.m24", "2");
-shouldBe("matrix.m31", "0");
-shouldBe("matrix.m32", "0");
-shouldBe("matrix.m33", "3");
-shouldBe("matrix.m34", "0");
-shouldBe("matrix.m41", "0");
-shouldBe("matrix.m42", "3");
-shouldBe("matrix.m43", "0");
-shouldBe("matrix.m44", "9");
-shouldBeFalse("matrix.is2D");
-shouldBeFalse("matrix.isIdentity");
-debug("");
+test(function() {
+ var other = new DOMMatrix();
+ other.m11 = 10;
+ other.m12 = 20;
+ other.m24 = 2;
+ other.m33 = 3;
+ other.m42 = 3;
+ other.m44 = 9;
-debug("# DOMMatrix(other)");
-var other = matrix;
-matrix = new DOMMatrix(other);
-shouldBe("matrix.a", "matrix.m11");
-shouldBe("matrix.b", "matrix.m12");
-shouldBe("matrix.c", "matrix.m21");
-shouldBe("matrix.d", "matrix.m22");
-shouldBe("matrix.e", "matrix.m41");
-shouldBe("matrix.f", "matrix.m42");
-shouldBe("matrix.m11", "10");
-shouldBe("matrix.m12", "20");
-shouldBe("matrix.m13", "0");
-shouldBe("matrix.m14", "0");
-shouldBe("matrix.m21", "0");
-shouldBe("matrix.m22", "1");
-shouldBe("matrix.m23", "0");
-shouldBe("matrix.m24", "2");
-shouldBe("matrix.m31", "0");
-shouldBe("matrix.m32", "0");
-shouldBe("matrix.m33", "3");
-shouldBe("matrix.m34", "0");
-shouldBe("matrix.m41", "0");
-shouldBe("matrix.m42", "3");
-shouldBe("matrix.m43", "0");
-shouldBe("matrix.m44", "9");
-shouldBeFalse("matrix.is2D");
-shouldBeFalse("matrix.isIdentity");
-debug("");
+ var matrix = new DOMMatrix(other);
+ assert_equals(matrix.m11, 10);
+ assert_equals(matrix.m12, 20);
+ assert_equals(matrix.m13, 0);
+ assert_equals(matrix.m14, 0);
+ assert_equals(matrix.m21, 0);
+ assert_equals(matrix.m22, 1);
+ assert_equals(matrix.m23, 0);
+ assert_equals(matrix.m24, 2);
+ assert_equals(matrix.m31, 0);
+ assert_equals(matrix.m32, 0);
+ assert_equals(matrix.m33, 3);
+ assert_equals(matrix.m34, 0);
+ assert_equals(matrix.m41, 0);
+ assert_equals(matrix.m42, 3);
+ assert_equals(matrix.m43, 0);
+ assert_equals(matrix.m44, 9);
+ assert_false(matrix.is2D);
+ assert_false(matrix.isIdentity);
+}, "DOMMatrix(other) constructor");
-debug("# DOMMatrix.is2D can never be set to 'true' when it was set to 'false' before calling setMatrixValue().");
-matrix = new DOMMatrix();
-shouldBeTrue("matrix.is2D");
-shouldBeTrue("matrix.isIdentity");
-matrix.m31 = 1;
-matrix.m33 = 0;
-shouldBeFalse("matrix.is2D");
-shouldBeFalse("matrix.isIdentity");
-matrix.m31 = 0;
-matrix.m33 = 1;
-shouldBeFalse("matrix.is2D");
-shouldBeTrue("matrix.isIdentity");
-debug("");
+test(function() {
+ var matrix = new DOMMatrix();
+ matrix.a = 10;
+ matrix.b = 20;
+ matrix.m24 = 2;
+ matrix.m33 = 3;
+ matrix.m42 = 3;
+ matrix.m44 = 9;
+ assert_equals(matrix.a, matrix.m11);
+ assert_equals(matrix.b, matrix.m12);
+ assert_equals(matrix.c, matrix.m21);
+ assert_equals(matrix.d, matrix.m22);
+ assert_equals(matrix.e, matrix.m41);
+ assert_equals(matrix.f, matrix.m42);
+ assert_equals(matrix.m11, 10);
+ assert_equals(matrix.m12, 20);
+ assert_equals(matrix.m13, 0);
+ assert_equals(matrix.m14, 0);
+ assert_equals(matrix.m21, 0);
+ assert_equals(matrix.m22, 1);
+ assert_equals(matrix.m23, 0);
+ assert_equals(matrix.m24, 2);
+ assert_equals(matrix.m31, 0);
+ assert_equals(matrix.m32, 0);
+ assert_equals(matrix.m33, 3);
+ assert_equals(matrix.m34, 0);
+ assert_equals(matrix.m41, 0);
+ assert_equals(matrix.m42, 3);
+ assert_equals(matrix.m43, 0);
+ assert_equals(matrix.m44, 9);
+ assert_false(matrix.is2D);
+ assert_false(matrix.isIdentity);
+}, "DOMMatrix attributes");
+
+test(function() {
+ var matrix = new DOMMatrix();
+ assert_true(matrix.is2D);
+ assert_true(matrix.isIdentity);
+ matrix.m31 = 1;
+ matrix.m33 = 0;
+ assert_false(matrix.is2D);
+ assert_false(matrix.isIdentity);
+ matrix.m31 = 0;
+ matrix.m33 = 1;
+ assert_false(matrix.is2D);
+ assert_true(matrix.isIdentity);
+}, "DOMMatrix.is2D can never be set to 'true' when it was set to 'false' before calling setMatrixValue().");
</script>
</body>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/geometry-interfaces-dom-matrix-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698