From: Cheng Zhao Date: Sat, 31 Jan 2015 01:56:31 +0000 (-0800) Subject: spec: Test loading script tag in html X-Git-Tag: v0.21.1~5^2~2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=24b5faf8dfa91c657742c7415368cf2fafb24d14;p=electron.git spec: Test loading script tag in html --- diff --git a/spec/asar-spec.coffee b/spec/asar-spec.coffee index 547b7474..21203c0d 100644 --- a/spec/asar-spec.coffee +++ b/spec/asar-spec.coffee @@ -392,6 +392,19 @@ describe 'asar package', -> assert.equal dirname, path.dirname(p) 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', -> originalFs = require 'original-fs' diff --git a/spec/fixtures/asar/script.asar b/spec/fixtures/asar/script.asar new file mode 100755 index 00000000..152045ad Binary files /dev/null and b/spec/fixtures/asar/script.asar differ