mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Add spec for invalid window.history.go offset
This commit is contained in:
@@ -989,4 +989,12 @@ describe('chromium feature', function () {
|
||||
}, /Cannot convert object to primitive value/)
|
||||
})
|
||||
})
|
||||
|
||||
describe('window.history.go(offset)', function () {
|
||||
it('throws an exception when the argumnet cannot be converted to a string', function () {
|
||||
assert.throws(function () {
|
||||
window.history.go({toString: null})
|
||||
}, /Cannot convert object to primitive value/)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user