Bug 1681855 - [remote] Fallback to default timeout in browser_consoleAPICalled.js. r=remote-protocol-reviewers,jgraham

The 250ms are too short given that the call to any console API could be
delayed due to IPC communication. As such use the default timeout
value as done by all the other tests that are using the events
recorder.

Differential Revision: https://phabricator.services.mozilla.com/D99657
This commit is contained in:
Henrik Skupin 2020-12-14 09:25:49 +00:00
parent bd1ef62248
commit 915e1d9809

View File

@ -163,7 +163,6 @@ add_task(async function consoleMessageByContent({ client }) {
async function runConsoleTest(client, eventCount, callback, options = {}) {
const { Runtime } = client;
const { timeout = 250 } = options;
const EVENT_CONSOLE_API_CALLED = "Runtime.consoleAPICalled";
@ -178,7 +177,7 @@ async function runConsoleTest(client, eventCount, callback, options = {}) {
const timeBefore = Date.now();
await callback();
const consoleAPIentries = await history.record(timeout);
const consoleAPIentries = await history.record();
is(consoleAPIentries.length, eventCount, "Got expected amount of events");
if (eventCount == 0) {