| Index: third_party/WebKit/LayoutTests/animations/resources/helpers.js
|
| diff --git a/third_party/WebKit/LayoutTests/animations/resources/helpers.js b/third_party/WebKit/LayoutTests/animations/resources/helpers.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fb3c4af075c59aca4c8dc5367eae086b4c629916
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/animations/resources/helpers.js
|
| @@ -0,0 +1,16 @@
|
| +'use strict';
|
| +
|
| +function matricesApproxEqual(actualMatrix, expectedMatrix, epsilon) {
|
| + const actualNumbers = actualMatrix.split(/[\(\) ,]/);
|
| + const expectedNumbers = expectedMatrix.split(/[\(\) ,]/);
|
| + if (actualNumbers.length !== expectedNumbers.length) {
|
| + return false;
|
| + }
|
| + for (var i = 0; i < actualNumbers.length; i++) {
|
| + if (actualNumbers[i] !== expectedNumbers[i] &&
|
| + Math.abs(Number(actualNumbers[i]) - Number(expectedNumbers[i])) > epsilon) {
|
| + return false;
|
| + }
|
| + }
|
| + return true;
|
| +}
|
|
|