feat: webContents.loadURL returns a promise (#15855)
This commit is contained in:
parent
1b8c11121f
commit
442c1b22e3
6 changed files with 180 additions and 13 deletions
|
@ -5,7 +5,6 @@ const dirtyChai = require('dirty-chai')
|
|||
const http = require('http')
|
||||
const path = require('path')
|
||||
const { closeWindow } = require('./window-helpers')
|
||||
const { emittedOnce } = require('./events-helpers')
|
||||
|
||||
const { expect } = chai
|
||||
chai.use(dirtyChai)
|
||||
|
@ -229,9 +228,7 @@ describe('ipc renderer module', () => {
|
|||
describe('ipcRenderer.on', () => {
|
||||
it('is not used for internals', async () => {
|
||||
w = new BrowserWindow({ show: false })
|
||||
w.loadURL('about:blank')
|
||||
|
||||
await emittedOnce(w.webContents, 'did-finish-load')
|
||||
await w.loadURL('about:blank')
|
||||
|
||||
const script = `require('electron').ipcRenderer.eventNames()`
|
||||
const result = await w.webContents.executeJavaScript(script)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue