diff --git a/spec/asar-spec.js b/spec/asar-spec.js index 7d7f36e2fc0a..b981c96135ad 100644 --- a/spec/asar-spec.js +++ b/spec/asar-spec.js @@ -840,6 +840,36 @@ describe('asar package', function () { done() }) }) + + it('loads video tag in html', function (done) { + this.timeout(14000) + + after(function () { + ipcMain.removeAllListeners('asar-video') + return closeWindow(w).then(function () { w = null }) + }) + + var w = new BrowserWindow({ + show: false, + width: 400, + height: 400 + }) + var p = path.resolve(fixtures, 'asar', 'video.asar', 'index.html') + var u = url.format({ + protocol: 'file', + slashed: true, + pathname: p + }) + w.loadURL(u) + ipcMain.on('asar-video', function (event, message, error) { + if (message === 'ended') { + assert(!error) + done() + } else if (message === 'error') { + done(error) + } + }) + }) }) describe('original-fs module', function () { diff --git a/spec/fixtures/asar/video.asar b/spec/fixtures/asar/video.asar new file mode 100644 index 000000000000..7b92354cd267 Binary files /dev/null and b/spec/fixtures/asar/video.asar differ