New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: html fullscreen transitions stacking #34908
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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, delay, defer } from './spec-helpers'; | ||
import { ifit, ifdescribe, defer, delay } from './spec-helpers'; | ||
import { AddressInfo } from 'net'; | ||
import { PipeTransport } from './pipe-transport'; | ||
|
||
|
@@ -1653,7 +1653,7 @@ describe('iframe using HTML fullscreen API while window is OS-fullscreened', () | |
server.close(); | ||
}); | ||
|
||
it('can fullscreen from out-of-process iframes (OOPIFs)', async () => { | ||
ifit(process.platform !== 'darwin')('can fullscreen from out-of-process iframes (non-macOS)', async () => { | ||
const fullscreenChange = emittedOnce(ipcMain, 'fullscreenChange'); | ||
const html = | ||
'<iframe style="width: 0" frameborder=0 src="http://localhost:8989" allowfullscreen></iframe>'; | ||
|
@@ -1677,8 +1677,37 @@ describe('iframe using HTML fullscreen API while window is OS-fullscreened', () | |
expect(width).to.equal(0); | ||
}); | ||
|
||
ifit(process.platform === 'darwin')('can fullscreen from out-of-process iframes (macOS)', async () => { | ||
await emittedOnce(w, 'enter-full-screen'); | ||
const fullscreenChange = emittedOnce(ipcMain, 'fullscreenChange'); | ||
const html = | ||
'<iframe style="width: 0" frameborder=0 src="http://localhost:8989" allowfullscreen></iframe>'; | ||
w.loadURL(`data:text/html,${html}`); | ||
await fullscreenChange; | ||
|
||
const fullscreenWidth = await w.webContents.executeJavaScript( | ||
"document.querySelector('iframe').offsetWidth" | ||
); | ||
expect(fullscreenWidth > 0).to.be.true(); | ||
|
||
await w.webContents.executeJavaScript( | ||
"document.querySelector('iframe').contentWindow.postMessage('exitFullscreen', '*')" | ||
); | ||
await emittedOnce(w.webContents, 'leave-html-full-screen'); | ||
|
||
const width = await w.webContents.executeJavaScript( | ||
"document.querySelector('iframe').offsetWidth" | ||
); | ||
expect(width).to.equal(0); | ||
|
||
w.setFullScreen(false); | ||
await emittedOnce(w, 'leave-full-screen'); | ||
}); | ||
|
||
// TODO(jkleinsc) fix this flaky test on WOA | ||
ifit(process.platform !== 'win32' || process.arch !== 'arm64')('can fullscreen from in-process iframes', async () => { | ||
if (process.platform === 'darwin') await emittedOnce(w, 'enter-full-screen'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And this one times out not ok 1120 iframe using HTML fullscreen API while window is OS-fullscreened can fullscreen from in-process iframes
Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/distiller/project/src/electron/spec-main/chromium-spec.ts)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, these appear to be flakes as they show up on other PRs too. I've rerun. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm, there are some more unrelated errors now but the errors I shared here are still present. Do you have a link to an old CI run in the 19-x-y line that has the same error? |
||
|
||
const fullscreenChange = emittedOnce(ipcMain, 'fullscreenChange'); | ||
w.loadFile(path.join(fixturesPath, 'pages', 'fullscreen-ipif.html')); | ||
await fullscreenChange; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assertion is failing on macOS