Add spec for window.open toString errors

This commit is contained in:
Kevin Sawicki 2017-04-25 13:16:07 -07:00
parent 4e7e9d1752
commit 7e285711ca

View file

@ -361,6 +361,16 @@ describe('chromium feature', function () {
})
b = window.open()
})
it('throws an exception when the arguments cannot be converted to strings', function () {
assert.throws(function () {
window.open('', {toString: null})
}, /Cannot convert object to primitive value/)
assert.throws(function () {
window.open('', '', {toString: 3})
}, /Cannot convert object to primitive value/)
})
})
describe('window.opener', function () {