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

Unified Diff: third_party/WebKit/LayoutTests/resources/testharness.js

Issue 1493473002: Update testharness.js and friends (and duplicate copies) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « third_party/WebKit/LayoutTests/resources/idlharness.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/resources/testharness.js
diff --git a/third_party/WebKit/LayoutTests/resources/testharness.js b/third_party/WebKit/LayoutTests/resources/testharness.js
index 9ad4f9aa5c1acdfd6be2c6903f53d7013e92fee2..7920ccd4e80e434a24b13978e9aa5db7031881a2 100644
--- a/third_party/WebKit/LayoutTests/resources/testharness.js
+++ b/third_party/WebKit/LayoutTests/resources/testharness.js
@@ -658,6 +658,14 @@ policies and contribution forms [3].
object.addEventListener(event, callback, false);
}
+ function step_timeout(f, t) {
+ var outer_this = this;
+ var args = Array.prototype.slice.call(arguments, 2);
+ return setTimeout(function() {
+ f.apply(outer_this, args);
+ }, t * tests.timeout_multiplier);
+ }
+
expose(test, 'test');
expose(async_test, 'async_test');
expose(promise_test, 'promise_test');
@@ -666,6 +674,7 @@ policies and contribution forms [3].
expose(setup, 'setup');
expose(done, 'done');
expose(on_event, 'on_event');
+ expose(step_timeout, 'step_timeout');
/*
* Return a string truncated to the given length, with ... added at the end
@@ -1097,7 +1106,7 @@ policies and contribution forms [3].
function _assert_inherits(name) {
return function (object, property_name, description)
{
- assert(typeof object === "object",
+ assert(typeof object === "object" || typeof object === "function",
name, description,
"provided value is not an object");
@@ -1167,6 +1176,7 @@ policies and contribution forms [3].
NO_MODIFICATION_ALLOWED_ERR: 'NoModificationAllowedError',
NOT_FOUND_ERR: 'NotFoundError',
NOT_SUPPORTED_ERR: 'NotSupportedError',
+ INUSE_ATTRIBUTE_ERR: 'InUseAttributeError',
INVALID_STATE_ERR: 'InvalidStateError',
SYNTAX_ERR: 'SyntaxError',
INVALID_MODIFICATION_ERR: 'InvalidModificationError',
@@ -1193,6 +1203,7 @@ policies and contribution forms [3].
NoModificationAllowedError: 7,
NotFoundError: 8,
NotSupportedError: 9,
+ InUseAttributeError: 10,
InvalidStateError: 11,
SyntaxError: 12,
InvalidModificationError: 13,
@@ -1422,6 +1433,14 @@ policies and contribution forms [3].
});
};
+ Test.prototype.step_timeout = function(f, timeout) {
+ var test_this = this;
+ var args = Array.prototype.slice.call(arguments, 2);
+ return setTimeout(this.step_func(function() {
+ return f.apply(test_this, args);
+ }, timeout * tests.timeout_multiplier));
+ }
+
Test.prototype.add_cleanup = function(callback) {
this.cleanup_callbacks.push(callback);
};
« no previous file with comments | « third_party/WebKit/LayoutTests/resources/idlharness.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698