test: ensure fullscreen test is retryable (#37179)

spec: ensure fullscreen test is retryable
This commit is contained in:
Samuel Attard 2023-02-08 12:40:24 -08:00 committed by GitHub
parent a15c9d3058
commit 8b380ee2f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2270,17 +2270,19 @@ describe('iframe using HTML fullscreen API while window is OS-fullscreened', ()
); );
let w: BrowserWindow, server: http.Server; let w: BrowserWindow, server: http.Server;
before(() => { beforeEach(async () => {
server = http.createServer(async (_req, res) => { server = http.createServer(async (_req, res) => {
res.writeHead(200, { 'Content-Type': 'text/html' }); res.writeHead(200, { 'Content-Type': 'text/html' });
res.write(await fullscreenChildHtml); res.write(await fullscreenChildHtml);
res.end(); res.end();
}); });
server.listen(8989, '127.0.0.1'); await new Promise<void>((resolve) => {
}); server.listen(8989, '127.0.0.1', () => {
resolve();
});
});
beforeEach(() => {
w = new BrowserWindow({ w = new BrowserWindow({
show: true, show: true,
fullscreen: true, fullscreen: true,