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

@ -6,7 +6,6 @@
const {app, BrowserWindow, ipcMain} = require('electron')
const path = require('path')
const url = require('url')
const MEDIA_ERR_SRC_NOT_SUPPORTED = 4
const FIVE_MINUTES = 5 * 60 * 1000
@ -18,11 +17,7 @@ app.once('ready', () => {
show: false
})
window.loadURL(url.format({
protocol: 'file',
slashed: true,
pathname: path.resolve(__dirname, 'asar', 'video.asar', 'index.html')
}))
window.loadFile(path.resolve(__dirname, 'asar', 'video.asar', 'index.html'))
ipcMain.on('asar-video', (event, message, error) => {
if (message === 'ended') {