Skip to content

Commit

Permalink
test: re-add accidentally deleted test (#19282)
Browse files Browse the repository at this point in the history
this was lost due to a tragic merge incident in #19182
  • Loading branch information
nornagon authored and MarshallOfSound committed Jul 16, 2019
1 parent 3ded946 commit 42f283c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions spec-main/api-browser-window-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2083,6 +2083,27 @@ describe('BrowserWindow module', () => {
expect(content).to.equal('function')
}
})
it('<webview> works in a scriptable popup', (done) => {
const preload = path.join(fixtures, 'api', 'new-window-webview-preload.js')

const w = new BrowserWindow({
show: false,
webPreferences: {
nodeIntegrationInSubFrames: true,
nativeWindowOpen: true,
webviewTag: true,
preload
}
})
w.webContents.once('new-window', (event, url, frameName, disposition, options) => {
options.show = false
})

ipcMain.once('webview-loaded', () => {
done()
})
w.loadFile(path.join(fixtures, 'api', 'new-window-webview.html'))
})
it('should inherit the nativeWindowOpen setting in opened windows', async () => {
const preloadPath = path.join(fixtures, 'api', 'new-window-preload.js')
w.webContents.once('new-window', (event, url, frameName, disposition, options) => {
Expand Down

0 comments on commit 42f283c

Please sign in to comment.