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
7
spec/fixtures/no-proprietary-codecs.js
vendored
7
spec/fixtures/no-proprietary-codecs.js
vendored
|
@ -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') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue