mirror of
https://github.com/electron/electron.git
synced 2026-01-25 23:38:18 -05:00
Time out after 5 minutes
This commit is contained in:
8
spec/fixtures/no-proprietary-codecs.js
vendored
8
spec/fixtures/no-proprietary-codecs.js
vendored
@@ -9,6 +9,7 @@ const path = require('path')
|
||||
const url = require('url')
|
||||
|
||||
const MEDIA_ERR_SRC_NOT_SUPPORTED = 4
|
||||
const FIVE_MINUTES = 5 * 60 * 1000
|
||||
|
||||
let window
|
||||
|
||||
@@ -23,7 +24,7 @@ app.once('ready', () => {
|
||||
pathname: path.resolve(__dirname, 'asar', 'video.asar', 'index.html')
|
||||
}))
|
||||
|
||||
ipcMain.on('asar-video', function (event, message, error) {
|
||||
ipcMain.on('asar-video', (event, message, error) => {
|
||||
if (message === 'ended') {
|
||||
console.log('Video played, proprietary codecs are included')
|
||||
app.exit(1)
|
||||
@@ -38,4 +39,9 @@ app.once('ready', () => {
|
||||
console.log(`Unexpected response from page: ${message} ${error}`)
|
||||
app.exit(1)
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
console.log('No IPC message after 5 minutes')
|
||||
app.exit(1)
|
||||
}, FIVE_MINUTES)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user