Convert targetOrigin to string in render process
This commit is contained in:
parent
3894c1c625
commit
246937a372
2 changed files with 12 additions and 1 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue