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

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

Issue 256743006: [New Multicolumn] Make offsetLeft, offsetTop and getClientRects() behave. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 6 years, 8 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 985f49f60213af05b1b00cecc02f42134f2cdeb7..d244de99fcb45b987c0c3177c85b102a984c54eb 100644
--- a/LayoutTests/resources/js-test.js
+++ b/LayoutTests/resources/js-test.js
@@ -532,6 +532,27 @@ function shouldBeDefined(_a)
testFailed(_a + " should be defined. Was " + _av);
}
+function shouldBeGreaterThan(_a, _b) {
+ if (typeof _a != "string" || typeof _b != "string")
+ debug("WARN: shouldBeGreaterThan expects string arguments");
+
+ var _exception;
+ var _av;
+ try {
+ _av = eval(_a);
+ } catch (e) {
+ _exception = e;
+ }
+ var _bv = eval(_b);
+
+ if (_exception)
+ testFailed(_a + " should be > " + _b + ". Threw exception " + _exception);
+ else if (typeof _av == "undefined" || _av <= _bv)
+ testFailed(_a + " should be > " + _b + ". Was " + _av + " (of type " + typeof _av + ").");
+ else
+ testPassed(_a + " is > " + _b);
+}
+
function shouldBeGreaterThanOrEqual(_a, _b) {
if (typeof _a != "string" || typeof _b != "string")
debug("WARN: shouldBeGreaterThanOrEqual expects string arguments");

Powered by Google App Engine
This is Rietveld 408576698