-
Notifications
You must be signed in to change notification settings - Fork 15k
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 #34909
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. I think this event is not emitted and so, this test times out on macOS: not ok 1115 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:557:17)
at processTimers (node:internal/timers:500:7) |
||
|
||
const fullscreenChange = emittedOnce(ipcMain, 'fullscreenChange'); | ||
w.loadFile(path.join(fixturesPath, 'pages', 'fullscreen-ipif.html')); | ||
await fullscreenChange; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 builds: