spec: "will-navigate" event
This commit is contained in:
parent
c2975d2bcc
commit
eaacf0a6ef
2 changed files with 15 additions and 0 deletions
|
@ -208,3 +208,11 @@ describe 'browser-window module', ->
|
|||
w.once 'minimize', -> done()
|
||||
w.show()
|
||||
w.minimize()
|
||||
|
||||
describe 'will-navigate event', ->
|
||||
it 'emits when user starts a navigation', (done) ->
|
||||
w.webContents.on 'will-navigate', (event, url) ->
|
||||
event.preventDefault()
|
||||
assert.equal url, 'https://www.github.com/'
|
||||
done()
|
||||
w.loadUrl "file://#{fixtures}/pages/will-navigate.html"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue