From 24b5faf8dfa91c657742c7415368cf2fafb24d14 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 30 Jan 2015 17:56:31 -0800 Subject: [PATCH] spec: Test loading script tag in html --- spec/asar-spec.coffee | 13 +++++++++++++ spec/fixtures/asar/script.asar | Bin 0 -> 204 bytes 2 files changed, 13 insertions(+) create mode 100755 spec/fixtures/asar/script.asar diff --git a/spec/asar-spec.coffee b/spec/asar-spec.coffee index 547b7474a82b..21203c0d4e10 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 0000000000000000000000000000000000000000..152045ad2a6bb6e1337bc70448fecde5100e3709 GIT binary patch literal 204 zcmYj}!3u&v5Qg{A$)}LHtb%AD7;NTabm~y(m=m^cI|h;LySJuLhmW5bzW?6{A literal 0 HcmV?d00001