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

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

Issue 66253005: shouldBecome* outputs variable name instead of its value on failure (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: update expectations that are supposed to fail with using shouldBecome Created 7 years, 1 month 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
« no previous file with comments | « LayoutTests/fast/loader/stateobjects/state-url-sets-links-visited-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/resources/js-test.js
diff --git a/LayoutTests/resources/js-test.js b/LayoutTests/resources/js-test.js
index 6e578d5e6372b8e7504823684e1c674f6f11e984..fc395457e054c749d38f4e5149732f7fa3144a62 100644
--- a/LayoutTests/resources/js-test.js
+++ b/LayoutTests/resources/js-test.js
@@ -229,6 +229,7 @@ function shouldBecomeEqual(_a, _b, completionHandler, timeout)
if (timeout === undefined)
timeout = 500;
+ var _bv;
var condition = function() {
var exception;
var _av;
@@ -237,7 +238,7 @@ function shouldBecomeEqual(_a, _b, completionHandler, timeout)
} catch (e) {
exception = e;
}
- var _bv = eval(_b);
+ _bv = eval(_b);
if (exception)
testFailed(_a + " should become " + _bv + ". Threw exception " + exception);
if (isResultCorrect(_av, _bv)) {
@@ -248,7 +249,7 @@ function shouldBecomeEqual(_a, _b, completionHandler, timeout)
};
var failureTime = Date.now() + timeout;
var failureHandler = function () {
- testFailed(_a + " failed to change to " + _b + " in " + (timeout / 1000) + " seconds.");
+ testFailed(_a + " failed to change to " + _bv + " in " + (timeout / 1000) + " seconds.");
completionHandler();
};
_waitForCondition(condition, failureTime, completionHandler, failureHandler);
@@ -348,6 +349,7 @@ function shouldBecomeDifferent(_a, _b, completionHandler, timeout)
if (timeout === undefined)
timeout = 500;
+ var _bv;
var condition = function() {
var exception;
var _av;
@@ -356,7 +358,7 @@ function shouldBecomeDifferent(_a, _b, completionHandler, timeout)
} catch (e) {
exception = e;
}
- var _bv = eval(_b);
+ _bv = eval(_b);
if (exception)
testFailed(_a + " should became not equal to " + _bv + ". Threw exception " + exception);
if (!isResultCorrect(_av, _bv)) {
@@ -367,7 +369,7 @@ function shouldBecomeDifferent(_a, _b, completionHandler, timeout)
};
var failureTime = Date.now() + timeout;
var failureHandler = function () {
- testFailed(_a + " did not become different from " + _b + " in " + (timeout / 1000) + " seconds.");
+ testFailed(_a + " did not become different from " + _bv + " in " + (timeout / 1000) + " seconds.");
completionHandler();
};
_waitForCondition(condition, failureTime, completionHandler, failureHandler);
« no previous file with comments | « LayoutTests/fast/loader/stateobjects/state-url-sets-links-visited-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698