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()); |
+} |