spec: Test loading script tag in html

This commit is contained in:
Cheng Zhao 2015-01-30 17:56:31 -08:00
parent 8b712bac8d
commit 24b5faf8df
2 changed files with 13 additions and 0 deletions

View file

@ -392,6 +392,19 @@ describe 'asar package', ->
assert.equal dirname, path.dirname(p) assert.equal dirname, path.dirname(p)
done() done()
it 'loads script tag in html', (done) ->
after ->
w.destroy()
ipc.removeAllListeners 'ping'
w = new BrowserWindow(show: false, width: 400, height: 400)
p = path.resolve fixtures, 'asar', 'script.asar', 'index.html'
u = url.format protocol: 'file', slashed: true, pathname: p
w.loadUrl u
ipc.once 'ping', (event, message) ->
assert.equal message, 'pong'
done()
describe 'original-fs module', -> describe 'original-fs module', ->
originalFs = require 'original-fs' originalFs = require 'original-fs'

BIN
spec/fixtures/asar/script.asar vendored Executable file

Binary file not shown.