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

Unified Diff: third_party/WebKit/LayoutTests/resources/js-test.js

Issue 1449623002: IntersectionObserver: second cut. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Add RuntimeEnabled flags to all idl's, fix test expectations. Created 4 years, 11 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/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;

Powered by Google App Engine
This is Rietveld 408576698