From 39fdc26921023d9b4bf3ac94de0779556f9786dc Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 30 Mar 2017 14:39:48 -0700 Subject: [PATCH] Time out after 5 minutes --- spec/fixtures/no-proprietary-codecs.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spec/fixtures/no-proprietary-codecs.js b/spec/fixtures/no-proprietary-codecs.js index 3e0e40933745..23a7d815a924 100644 --- a/spec/fixtures/no-proprietary-codecs.js +++ b/spec/fixtures/no-proprietary-codecs.js @@ -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) })