Skip to content

Commit 28d8ed0

Browse files
trop[bot]jkleinsc
andauthored
test: cleanup RenderFrame lifespan tests (#47795)
* test: cleanup RenderFrame lifespan tests Co-authored-by: John Kleinschmidt <[email protected]> * test: disable navigator.serial tests on arm64 mac debug the hang test: disable navigator.bluetooth on arm64 mac Revert "test: disable navigator.bluetooth on arm64 mac" This reverts commit 4b53a84. Revert "debug the hang" This reverts commit 00338f0. Revert "test: disable navigator.serial tests on arm64 mac" This reverts commit fb515ce. Reapply "test: disable navigator.serial tests on arm64 mac" This reverts commit 0e56081. Reapply "test: disable navigator.bluetooth on arm64 mac" This reverts commit f4c7d3f. fixup Co-authored-by: John Kleinschmidt <[email protected]> * test: add waitUntil for flaky test Co-authored-by: John Kleinschmidt <[email protected]> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <[email protected]>
1 parent ee8942d commit 28d8ed0

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

spec/api-web-frame-main-spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ describe('webFrameMain module', () => {
313313
beforeEach(async () => {
314314
w = new BrowserWindow({ show: false });
315315
});
316+
afterEach(closeAllWindows);
316317

317318
// TODO(jkleinsc) fix this flaky test on linux
318319
ifit(process.platform !== 'linux')('throws upon accessing properties when disposed', async () => {
@@ -373,7 +374,9 @@ describe('webFrameMain module', () => {
373374
await w.webContents.loadURL(server.crossOriginUrl);
374375
// senderFrame now points to a disposed RenderFrameHost. It should
375376
// be null when attempting to access the lazily evaluated property.
376-
expect(event.senderFrame).to.be.null();
377+
waitUntil(() => {
378+
return event.senderFrame === null;
379+
});
377380
});
378381

379382
it('is detached when unload handler sends IPC', async () => {

spec/chromium-spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3089,7 +3089,7 @@ describe('iframe using HTML fullscreen API while window is OS-fullscreened', ()
30893089
});
30903090
});
30913091

3092-
describe('navigator.serial', () => {
3092+
ifdescribe(process.platform !== 'darwin' || process.arch !== 'arm64')('navigator.serial', () => {
30933093
let w: BrowserWindow;
30943094
before(async () => {
30953095
w = new BrowserWindow({
@@ -3621,7 +3621,7 @@ ifdescribe((process.platform !== 'linux' || app.isUnityRunning()))('navigator.se
36213621
});
36223622
});
36233623

3624-
describe('navigator.bluetooth', () => {
3624+
ifdescribe(process.platform !== 'darwin' || process.arch !== 'arm64')('navigator.bluetooth', () => {
36253625
let w: BrowserWindow;
36263626
before(async () => {
36273627
w = new BrowserWindow({

0 commit comments

Comments
 (0)