refactor: use loadFile when appropriate in tests (#14422)

This commit is contained in:
Milan Burda 2018-09-04 16:50:53 +02:00 committed by Charles Kerr
parent e8782f2c2d
commit c63014c256
13 changed files with 115 additions and 137 deletions

View file

@ -33,7 +33,7 @@ describe('debugger module', () => {
done()
}
})
w.webContents.loadURL(`file://${path.join(fixtures, 'pages', 'a.html')}`)
w.webContents.loadFile(path.join(fixtures, 'pages', 'a.html'))
})
it('fails when protocol version is not supported', done => {
@ -108,7 +108,7 @@ describe('debugger module', () => {
const url = process.platform !== 'win32'
? `file://${path.join(fixtures, 'pages', 'a.html')}`
: `file:///${path.join(fixtures, 'pages', 'a.html').replace(/\\/g, '/')}`
w.webContents.loadURL(url)
w.webContents.loadFile(path.join(fixtures, 'pages', 'a.html'))
try {
w.webContents.debugger.attach()