Add spec for window.open toString errors
This commit is contained in:
parent
4e7e9d1752
commit
7e285711ca
1 changed files with 10 additions and 0 deletions
|
@ -361,6 +361,16 @@ describe('chromium feature', function () {
|
||||||
})
|
})
|
||||||
b = window.open()
|
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 () {
|
describe('window.opener', function () {
|
||||||
|
|
Loading…
Reference in a new issue