MCPcopy Create free account
hub / github.com/nodejs/node / step_timeout

Function step_timeout

test/fixtures/wpt/resources/testharness.js:1277–1284  ·  view source on GitHub ↗

* Global version of :js:func:`Test.step_timeout` for use in single page tests. * * @param {Function} func - Function to run after the timeout * @param {number} timeout - Time in ms to wait before running the * test step. The actual wait time is ``timeout`` x * ``timeout_mult

(func, timeout)

Source from the content-addressed store, hash-verified

1275 * ``timeout_multiplier``.
1276 */
1277 function step_timeout(func, timeout) {
1278 var outer_this = this;
1279 var args = Array.prototype.slice.call(arguments, 2);
1280 var local_set_timeout = typeof global_scope.setTimeout === "undefined" ? fake_set_timeout : setTimeout;
1281 return local_set_timeout(function() {
1282 func.apply(outer_this, args);
1283 }, timeout * tests.timeout_multiplier);
1284 }
1285
1286 expose(test, 'test');
1287 expose(async_test, 'async_test');

Callers 11

sampleAnimationFunction · 0.70
runAnimationTestFunction · 0.70
microtasksRunFunction · 0.50
observe_entryFunction · 0.50
waitForNextTaskFunction · 0.50
checkMethod · 0.50
constructorMethod · 0.50
test-utils.jsFile · 0.50
delayedLoadListenerFunction · 0.50
waitFunction · 0.50

Calls 2

callMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected