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

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

Issue 906193003: shouldBecomeEqual() behaves as shouldBe() if the testing expression returns the expected value Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add regression test Created 5 years, 10 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: LayoutTests/resources/js-test.js
diff --git a/LayoutTests/resources/js-test.js b/LayoutTests/resources/js-test.js
index e4d56e4256eeb46c2152ed6dff9559d1c84d6e05..c1eb583721036191879793ea378735f6b2e478a2 100644
--- a/LayoutTests/resources/js-test.js
+++ b/LayoutTests/resources/js-test.js
@@ -291,7 +291,7 @@ function shouldBecomeEqual(_a, _b, _completionHandler, _timeout)
_timeout = 500;
var _bv;
- var _condition = function() {
+ function _condition() {
var _exception;
var _av;
try {
@@ -313,7 +313,7 @@ function shouldBecomeEqual(_a, _b, _completionHandler, _timeout)
testFailed(_a + " failed to change to " + _bv + " in " + (_timeout / 1000) + " seconds.");
_completionHandler();
};
- _waitForCondition(_condition, _failureTime, _completionHandler, _failureHandler);
+ setTimeout(_waitForCondition, 5, _condition, _failureTime, _completionHandler, _failureHandler);
please use gerrit instead 2015/02/17 16:28:48 I'm still quite queasy about this change. We are s
yosin_UTC9 2016/09/01 01:49:07 It is "5ms" instead of "5s". https://developer.moz
}
function shouldBecomeEqualToString(value, reference, completionHandler, timeout)
@@ -411,7 +411,7 @@ function shouldBecomeDifferent(_a, _b, _completionHandler, _timeout)
_timeout = 500;
var _bv;
- var _condition = function() {
+ function _condition() {
var _exception;
var _av;
try {
@@ -433,7 +433,7 @@ function shouldBecomeDifferent(_a, _b, _completionHandler, _timeout)
testFailed(_a + " did not become different from " + _bv + " in " + (_timeout / 1000) + " seconds.");
_completionHandler();
};
- _waitForCondition(_condition, _failureTime, _completionHandler, _failureHandler);
+ setTimeout(_waitForCondition, 5, _condition, _failureTime, _completionHandler, _failureHandler);
}
function shouldBeTrue(a, quiet) { shouldBe(a, "true", quiet); }

Powered by Google App Engine
This is Rietveld 408576698