mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: use loadFile when appropriate in tests (#14422)
This commit is contained in:
committed by
Charles Kerr
parent
e8782f2c2d
commit
c63014c256
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user