Add specs for window.open frameName argument
This commit is contained in:
parent
b9b3abbeae
commit
9643b2a5c5
1 changed files with 20 additions and 0 deletions
|
@ -371,6 +371,26 @@ describe('chromium feature', function () {
|
|||
window.open('', '', {toString: 3})
|
||||
}, /Cannot convert object to primitive value/)
|
||||
})
|
||||
|
||||
it('sets the window title to the specified frameName', function (done) {
|
||||
let b
|
||||
app.once('browser-window-created', (event, createdWindow) => {
|
||||
assert.equal(createdWindow.getTitle(), 'hello')
|
||||
b.close()
|
||||
done()
|
||||
})
|
||||
b = window.open('', 'hello')
|
||||
})
|
||||
|
||||
it('does not throw an exception when the frameName is a built-in object property', function (done) {
|
||||
let b
|
||||
app.once('browser-window-created', (event, createdWindow) => {
|
||||
assert.equal(createdWindow.getTitle(), '__proto__')
|
||||
b.close()
|
||||
done()
|
||||
})
|
||||
b = window.open('', '__proto__')
|
||||
})
|
||||
})
|
||||
|
||||
describe('window.opener', function () {
|
||||
|
|
Loading…
Reference in a new issue