| Index: LayoutTests/resources/js-test.js
|
| diff --git a/LayoutTests/resources/js-test.js b/LayoutTests/resources/js-test.js
|
| index 016c67f8ae3a08edfc76dfa59dd2afb4b86d87e9..c94f5740c3e55cc54818177f2f847cf71885b207 100644
|
| --- a/LayoutTests/resources/js-test.js
|
| +++ b/LayoutTests/resources/js-test.js
|
| @@ -158,12 +158,20 @@ function isMinusZero(n)
|
| return n === 0 && 1/n < 0;
|
| }
|
|
|
| +function isNewSVGTearOffType(v)
|
| +{
|
| + return ['[object SVGLength]', '[object SVGLengthList]'].indexOf(""+v) != -1;
|
| +}
|
| +
|
| function isResultCorrect(actual, expected)
|
| {
|
| if (expected === 0)
|
| return actual === expected && (1/actual) === (1/expected);
|
| if (actual === expected)
|
| return true;
|
| + // http://crbug.com/308818 : The new implementation of SVGListProperties do not necessary return the same wrapper object, so === operator would not work. We compare for their string representation instead.
|
| + if (isNewSVGTearOffType(expected) && typeof(expected) == typeof(actual) && actual.valueAsString == expected.valueAsString)
|
| + return true;
|
| if (typeof(expected) == "number" && isNaN(expected))
|
| return typeof(actual) == "number" && isNaN(actual);
|
| if (expected && (Object.prototype.toString.call(expected) == Object.prototype.toString.call([])))
|
| @@ -173,6 +181,8 @@ function isResultCorrect(actual, expected)
|
|
|
| function stringify(v)
|
| {
|
| + if (isNewSVGTearOffType(v))
|
| + return v.valueAsString;
|
| if (v === 0 && 1/v < 0)
|
| return "-0";
|
| else return "" + v;
|
|
|