refactor: use loadFile when appropriate in tests (#14422)
This commit is contained in:
parent
e8782f2c2d
commit
c63014c256
13 changed files with 115 additions and 137 deletions
|
@ -154,7 +154,7 @@ describe('ipc renderer module', () => {
|
|||
ipcRenderer.sendTo(contents.id, 'ping', payload)
|
||||
})
|
||||
|
||||
contents.loadURL(`file://${path.join(fixtures, 'pages', 'ping-pong.html')}`)
|
||||
contents.loadFile(path.join(fixtures, 'pages', 'ping-pong.html'))
|
||||
})
|
||||
|
||||
it('sends message to WebContents (sanboxed renderer)', done => {
|
||||
|
@ -174,7 +174,7 @@ describe('ipc renderer module', () => {
|
|||
ipcRenderer.sendTo(contents.id, 'ping', payload)
|
||||
})
|
||||
|
||||
contents.loadURL(`file://${path.join(fixtures, 'pages', 'ping-pong.html')}`)
|
||||
contents.loadFile(path.join(fixtures, 'pages', 'ping-pong.html'))
|
||||
})
|
||||
|
||||
it('sends message to WebContents (channel has special chars)', done => {
|
||||
|
@ -193,7 +193,7 @@ describe('ipc renderer module', () => {
|
|||
ipcRenderer.sendTo(contents.id, 'ping-æøåü', payload)
|
||||
})
|
||||
|
||||
contents.loadURL(`file://${path.join(fixtures, 'pages', 'ping-pong.html')}`)
|
||||
contents.loadFile(path.join(fixtures, 'pages', 'ping-pong.html'))
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -221,7 +221,7 @@ describe('ipc renderer module', () => {
|
|||
|
||||
w.webContents.reload()
|
||||
})
|
||||
w.loadURL(`file://${path.join(fixtures, 'api', 'remote-event-handler.html')}`)
|
||||
w.loadFile(path.join(fixtures, 'api', 'remote-event-handler.html'))
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue