Fix failed specs caused by window.open url parsing
This commit is contained in:
parent
260ec96edd
commit
6383eb876e
2 changed files with 2 additions and 2 deletions
|
@ -192,7 +192,7 @@ describe 'browser-window module', ->
|
||||||
it 'emits when window.open is called', (done) ->
|
it 'emits when window.open is called', (done) ->
|
||||||
w.webContents.once 'new-window', (e, url, frameName) ->
|
w.webContents.once 'new-window', (e, url, frameName) ->
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
assert.equal url, 'http://host'
|
assert.equal url, 'http://host/'
|
||||||
assert.equal frameName, 'host'
|
assert.equal frameName, 'host'
|
||||||
done()
|
done()
|
||||||
w.loadUrl "file://#{fixtures}/pages/window-open.html"
|
w.loadUrl "file://#{fixtures}/pages/window-open.html"
|
||||||
|
|
|
@ -144,7 +144,7 @@ describe '<webview> tag', ->
|
||||||
describe 'new-window event', ->
|
describe 'new-window event', ->
|
||||||
it 'emits when window.open is called', (done) ->
|
it 'emits when window.open is called', (done) ->
|
||||||
webview.addEventListener 'new-window', (e) ->
|
webview.addEventListener 'new-window', (e) ->
|
||||||
assert.equal e.url, 'http://host'
|
assert.equal e.url, 'http://host/'
|
||||||
assert.equal e.frameName, 'host'
|
assert.equal e.frameName, 'host'
|
||||||
done()
|
done()
|
||||||
webview.src = "file://#{fixtures}/pages/window-open.html"
|
webview.src = "file://#{fixtures}/pages/window-open.html"
|
||||||
|
|
Loading…
Reference in a new issue