test: use delay() helper (#24321)

This commit is contained in:
Milan Burda 2020-06-26 22:59:54 +02:00 committed by GitHub
parent 8eb198bab4
commit 1c49e4e376
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 24 additions and 36 deletions

View file

@ -10,7 +10,7 @@ import * as url from 'url';
import * as ChildProcess from 'child_process';
import { EventEmitter } from 'events';
import { promisify } from 'util';
import { ifit, ifdescribe } from './spec-helpers';
import { ifit, ifdescribe, delay } from './spec-helpers';
import { AddressInfo } from 'net';
import { PipeTransport } from './pipe-transport';
@ -1374,7 +1374,7 @@ describe('iframe using HTML fullscreen API while window is OS-fullscreened', ()
"document.querySelector('iframe').contentWindow.postMessage('exitFullscreen', '*')"
);
await new Promise(resolve => setTimeout(resolve, 500));
await delay(500);
const width = await w.webContents.executeJavaScript(
"document.querySelector('iframe').offsetWidth"