diff --git a/spec/chromium-spec.js b/spec/chromium-spec.js index 9cce9fe2808a..dd992dc0ae5a 100644 --- a/spec/chromium-spec.js +++ b/spec/chromium-spec.js @@ -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 () {