fix: lost window.opener after cross-origin navigation (#18173)
* Get a site instance related to current one instead of creation a new one Using `GetRelatedSiteInstance` will keep the relation (same browsing instance) between the current and the new site instance. * Some relies on preloads in opened window The fact that, now, we always have an opener for opened windows diables note integration in opened windows, except if `nodeIntegrationInSubFrames` is enabled. * Add a test on window.opener after cross-orgin navigation * Make sure to unregisterProtocol in tests * Introduc and use a NetworkSandbox for tests * Modify tests about zoom persistence to properly simulate cross-origin navigation * Revert "Modify tests about zoom persistence to properly simulate cross-origin navigation" This reverts commit 0a7537f2eb7f183ddec16637e8a2e92a0d600321.
This commit is contained in:
parent
cec61d010b
commit
b4276835d8
4 changed files with 206 additions and 30 deletions
3
spec/fixtures/api/window-open-preload.js
vendored
3
spec/fixtures/api/window-open-preload.js
vendored
|
@ -2,7 +2,8 @@ const { ipcRenderer } = require('electron')
|
|||
|
||||
setImmediate(function () {
|
||||
if (window.location.toString() === 'bar://page') {
|
||||
ipcRenderer.send('answer', process.argv, typeof global.process)
|
||||
const windowOpenerIsNull = window.opener == null
|
||||
ipcRenderer.send('answer', process.argv, typeof global.process, windowOpenerIsNull)
|
||||
window.close()
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue