feat: add additional remote APIs filtering (#16293)
This commit is contained in:
parent
6436a12d7f
commit
349a3c20ae
8 changed files with 323 additions and 69 deletions
|
@ -1188,6 +1188,24 @@ describe('<webview> tag', function () {
|
|||
})
|
||||
})
|
||||
|
||||
describe('<webview>.getWebContents filtering', () => {
|
||||
it('can return custom value', async () => {
|
||||
const src = 'about:blank'
|
||||
await loadWebView(webview, { src })
|
||||
|
||||
ipcRenderer.send('handle-next-remote-get-guest-web-contents', 'Hello World!')
|
||||
expect(webview.getWebContents()).to.be.equal('Hello World!')
|
||||
})
|
||||
|
||||
it('throws when no returnValue set', async () => {
|
||||
const src = 'about:blank'
|
||||
await loadWebView(webview, { src })
|
||||
|
||||
ipcRenderer.send('handle-next-remote-get-guest-web-contents')
|
||||
expect(() => webview.getWebContents()).to.throw('Blocked remote.getGuestForWebContents()')
|
||||
})
|
||||
})
|
||||
|
||||
// FIXME(deepak1556): Ch69 follow up.
|
||||
xdescribe('document.visibilityState/hidden', () => {
|
||||
afterEach(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue