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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/resources/geometry-interfaces-test-helpers.js

Issue 2365153002: [GeometryInterface] Add rotateAxisAngle*(x,y,z,angle) function. (Closed)
Patch Set: update test. Created 4 years, 2 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/fast/dom/resources/geometry-interfaces-test-helpers.js
diff --git a/third_party/WebKit/LayoutTests/fast/dom/resources/geometry-interfaces-test-helpers.js b/third_party/WebKit/LayoutTests/fast/dom/resources/geometry-interfaces-test-helpers.js
index e54ca056fb7328d306ad16dda0431ee103586355..ee27f2b8f05134cf2c02c7b46560e6d2371be44b 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/resources/geometry-interfaces-test-helpers.js
+++ b/third_party/WebKit/LayoutTests/fast/dom/resources/geometry-interfaces-test-helpers.js
@@ -53,3 +53,13 @@ function assert_3d_matrix_equals(actual, expected) {
expected[12], expected[13], expected[14], expected[15],
]);
}
+
+function assert_array_almost_equals(actual, expected) {
+ for (var i = 0; i < actual.length; i++) {
+ assert_equals(actual[i].toFixed(10), expected[i].toFixed(10));
+ }
+}
+
+function assert_matrix_almost_equals(actual, expected) {
+ assert_array_almost_equals(actual.toFloat64Array(), expected.toFloat64Array());
+}

Powered by Google App Engine
This is Rietveld 408576698