refactor: use IPC helpers in window-setup (#17948)
This commit is contained in:
parent
c3ae476deb
commit
419ce494e9
7 changed files with 72 additions and 93 deletions
|
@ -618,9 +618,9 @@ describe('chromium feature', () => {
|
|||
w.close()
|
||||
})
|
||||
|
||||
it('does nothing when origin of current window does not match opener', (done) => {
|
||||
it('fails when origin of current window does not match opener', (done) => {
|
||||
listener = (event) => {
|
||||
expect(event.data).to.equal('')
|
||||
expect(event.data).to.equal(null)
|
||||
done()
|
||||
}
|
||||
window.addEventListener('message', listener)
|
||||
|
@ -666,10 +666,10 @@ describe('chromium feature', () => {
|
|||
if (webview != null) webview.remove()
|
||||
})
|
||||
|
||||
it('does nothing when origin of webview src URL does not match opener', (done) => {
|
||||
it('fails when origin of webview src URL does not match opener', (done) => {
|
||||
webview = new WebView()
|
||||
webview.addEventListener('console-message', (e) => {
|
||||
expect(e.message).to.equal('')
|
||||
expect(e.message).to.equal('null')
|
||||
done()
|
||||
})
|
||||
webview.setAttribute('allowpopups', 'on')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue