]> khamidou — GitHub mirrors - electron.git/commitdiff
Fix failed specs caused by window.open url parsing
authorCheng Zhao <zcbenz@gmail.com>
Fri, 10 Jul 2015 04:14:25 +0000 (12:14 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 10 Jul 2015 04:14:25 +0000 (12:14 +0800)
spec/api-browser-window-spec.coffee
spec/webview-spec.coffee

index e7406f9a2afd4bac06eab90344a5e7c3a10a134f..ce1282439a2daff09254ec484b7451c962523ef8 100644 (file)
@@ -192,7 +192,7 @@ describe 'browser-window module', ->
     it 'emits when window.open is called', (done) ->
       w.webContents.once 'new-window', (e, url, frameName) ->
         e.preventDefault()
-        assert.equal url, 'http://host'
+        assert.equal url, 'http://host/'
         assert.equal frameName, 'host'
         done()
       w.loadUrl "file://#{fixtures}/pages/window-open.html"
index 704bdd7f3fd82bb160cbb91e35ec148ba3d2d457..cd22e57a18bf8b070b899f10c98a5efe08ec38b3 100644 (file)
@@ -144,7 +144,7 @@ describe '<webview> tag', ->
   describe 'new-window event', ->
     it 'emits when window.open is called', (done) ->
       webview.addEventListener 'new-window', (e) ->
-        assert.equal e.url, 'http://host'
+        assert.equal e.url, 'http://host/'
         assert.equal e.frameName, 'host'
         done()
       webview.src = "file://#{fixtures}/pages/window-open.html"