Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
test: ensure fullscreen test is retryable (electron#37179)
Browse files Browse the repository at this point in the history
spec: ensure fullscreen test is retryable
  • Loading branch information
MarshallOfSound authored and khalwa committed Feb 22, 2023
1 parent 7a3c52d commit d980147
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions spec/chromium-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2270,17 +2270,19 @@ describe('iframe using HTML fullscreen API while window is OS-fullscreened', ()
);
let w: BrowserWindow, server: http.Server;

before(() => {
beforeEach(async () => {
server = http.createServer(async (_req, res) => {
res.writeHead(200, { 'Content-Type': 'text/html' });
res.write(await fullscreenChildHtml);
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({
show: true,
fullscreen: true,
Expand Down

0 comments on commit d980147

Please sign in to comment.