Update web-platform-tests to revision 12d3e15e5ecae695e1216c358d613705fbff6b68

This commit is contained in:
Ms2ger 2015-07-27 13:50:32 +02:00
parent 78455ec033
commit 5b2ca4d132
424 changed files with 4377 additions and 8656 deletions

View file

@ -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
@ -1422,6 +1431,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);
};