build: enable JS semicolons (#22783)
This commit is contained in:
parent
24e21467b9
commit
5d657dece4
354 changed files with 21512 additions and 21510 deletions
44
spec/fixtures/no-proprietary-codecs.js
vendored
44
spec/fixtures/no-proprietary-codecs.js
vendored
|
@ -4,13 +4,13 @@
|
|||
// proprietary codecs to ensure Electron uses it instead of the version
|
||||
// that does include proprietary codecs.
|
||||
|
||||
const { app, BrowserWindow, ipcMain } = require('electron')
|
||||
const path = require('path')
|
||||
const { app, BrowserWindow, ipcMain } = require('electron');
|
||||
const path = require('path');
|
||||
|
||||
const MEDIA_ERR_SRC_NOT_SUPPORTED = 4
|
||||
const FIVE_MINUTES = 5 * 60 * 1000
|
||||
const MEDIA_ERR_SRC_NOT_SUPPORTED = 4;
|
||||
const FIVE_MINUTES = 5 * 60 * 1000;
|
||||
|
||||
let window
|
||||
let window;
|
||||
|
||||
app.whenReady().then(() => {
|
||||
window = new BrowserWindow({
|
||||
|
@ -18,33 +18,33 @@ app.whenReady().then(() => {
|
|||
webPreferences: {
|
||||
nodeIntegration: true
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
window.webContents.on('crashed', (event, killed) => {
|
||||
console.log(`WebContents crashed (killed=${killed})`)
|
||||
app.exit(1)
|
||||
})
|
||||
console.log(`WebContents crashed (killed=${killed})`);
|
||||
app.exit(1);
|
||||
});
|
||||
|
||||
window.loadFile(path.resolve(__dirname, 'test.asar', 'video.asar', 'index.html'))
|
||||
window.loadFile(path.resolve(__dirname, 'test.asar', 'video.asar', 'index.html'));
|
||||
|
||||
ipcMain.on('asar-video', (event, message, error) => {
|
||||
if (message === 'ended') {
|
||||
console.log('Video played, proprietary codecs are included')
|
||||
app.exit(1)
|
||||
return
|
||||
console.log('Video played, proprietary codecs are included');
|
||||
app.exit(1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (message === 'error' && error === MEDIA_ERR_SRC_NOT_SUPPORTED) {
|
||||
app.exit(0)
|
||||
return
|
||||
app.exit(0);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`Unexpected response from page: ${message} ${error}`)
|
||||
app.exit(1)
|
||||
})
|
||||
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)
|
||||
})
|
||||
console.log('No IPC message after 5 minutes');
|
||||
app.exit(1);
|
||||
}, FIVE_MINUTES);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue