]> khamidou — GitHub mirrors - electron.git/commitdiff
spec: Load url after event listener is set up
authorCheng Zhao <zcbenz@gmail.com>
Fri, 16 Oct 2015 11:58:20 +0000 (19:58 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 16 Oct 2015 12:22:04 +0000 (20:22 +0800)
spec/asar-spec.coffee

index 1e6ee69103694c084f5725d9f1ea0099d1ba87ff..75f0cec63adb42c86fb49c1b515bbbbd6f64b0f8 100644 (file)
@@ -450,10 +450,10 @@ describe 'asar package', ->
       w = new BrowserWindow(show: false, width: 400, height: 400)
       p = path.resolve fixtures, 'asar', 'web.asar', 'index.html'
       u = url.format protocol: 'file', slashed: true, pathname: p
-      w.loadUrl u
       ipc.once 'dirname', (event, dirname) ->
         assert.equal dirname, path.dirname(p)
         done()
+      w.loadUrl u
 
     it 'loads script tag in html', (done) ->
       after ->