| Index: third_party/WebKit/LayoutTests/resources/js-test.js
|
| diff --git a/third_party/WebKit/LayoutTests/resources/js-test.js b/third_party/WebKit/LayoutTests/resources/js-test.js
|
| index 2811201b62f53e4e7dcf8ffed4900af8857a9cf8..c0988cea14a0d4c2c8eff34ebcf4cac0e81376a6 100644
|
| --- a/third_party/WebKit/LayoutTests/resources/js-test.js
|
| +++ b/third_party/WebKit/LayoutTests/resources/js-test.js
|
| @@ -516,6 +516,23 @@ function shouldEvaluateTo(actual, expected, opt_tolerance) {
|
| }
|
| }
|
|
|
| +function shouldEvaluateToSameObject(actual, expected, quiet) {
|
| + if (typeof actual != "string")
|
| + debug("WARN: shouldEvaluateToSameObject() expects the first argument (actual) to be a string.");
|
| + try {
|
| + actualEvaled = eval(actual);
|
| + } catch (e) {
|
| + testFailed("Evaluating " + actual + ": Threw exception " + e);
|
| + return;
|
| + }
|
| + if (isResultCorrect(actualEvaled, expected)) {
|
| + if (!quiet)
|
| + testPassed(actual + " is " + stringify(expected));
|
| + } else {
|
| + testFailed(actual + " should be " + stringify(expected) + ". Was " + stringify(actualEvaled));
|
| + }
|
| +}
|
| +
|
| function shouldBeNonZero(_a)
|
| {
|
| var _exception;
|
|
|