Convert targetOrigin to string in render process

This commit is contained in:
Kevin Sawicki 2017-04-25 13:26:47 -07:00
parent 3894c1c625
commit 246937a372
2 changed files with 12 additions and 1 deletions

View file

@ -548,6 +548,14 @@ describe('chromium feature', function () {
})
b = window.open('file://' + fixtures + '/pages/window-open-postMessage.html', '', 'show=no')
})
it('throws an exception when the targetOrigin cannot be converted to a string', function () {
var b = window.open('')
assert.throws(function () {
b.postMessage('test', {toString: null})
}, /Cannot convert object to primitive value/)
b.close()
})
})
describe('window.opener.postMessage', function () {