From: Cheng Zhao Date: Fri, 10 Jul 2015 04:14:25 +0000 (+0800) Subject: Fix failed specs caused by window.open url parsing X-Git-Tag: v0.30.0~39 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=6383eb876ed451d84ada751c0f0ff37440d49cd0;p=electron.git Fix failed specs caused by window.open url parsing --- diff --git a/spec/api-browser-window-spec.coffee b/spec/api-browser-window-spec.coffee index e7406f9a..ce128243 100644 --- a/spec/api-browser-window-spec.coffee +++ b/spec/api-browser-window-spec.coffee @@ -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" diff --git a/spec/webview-spec.coffee b/spec/webview-spec.coffee index 704bdd7f..cd22e57a 100644 --- a/spec/webview-spec.coffee +++ b/spec/webview-spec.coffee @@ -144,7 +144,7 @@ describe ' 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"