fix: refactoring regression in LocationProxy (#19495)

This commit is contained in:
Milan Burda 2019-07-29 20:20:19 +02:00 committed by Shelley Vohr
parent 4838bd7834
commit 8a33118e36
2 changed files with 22 additions and 2 deletions

View file

@ -508,6 +508,22 @@ describe('chromium feature', () => {
b = window.open('about:blank')
})
it('defines a window.location.href setter', (done) => {
let b = null
app.once('browser-window-created', (event, { webContents }) => {
webContents.once('did-finish-load', () => {
// When it loads, redirect
b.location.href = `file://${fixtures}/pages/base-page.html`
webContents.once('did-finish-load', () => {
// After our second redirect, cleanup and callback
b.close()
done()
})
})
})
b = window.open('about:blank')
})
it('open a blank page when no URL is specified', async () => {
const browserWindowCreated = emittedOnce(app, 'browser-window-created')
const w = window.open()