feat: add support for webContents option in BrowserView (#26802)
* feat: add support for webContents option in BrowserView * tests: add tests
This commit is contained in:
parent
6932e17088
commit
1e2a2004e9
5 changed files with 54 additions and 21 deletions
|
@ -39,6 +39,15 @@ describe('BrowserView module', () => {
|
|||
expect(webContents.getAllWebContents()).to.have.length(0);
|
||||
});
|
||||
|
||||
it('can be created with an existing webContents', async () => {
|
||||
const wc = (webContents as any).create({ sandbox: true });
|
||||
await wc.loadURL('about:blank');
|
||||
|
||||
view = new BrowserView({ webContents: wc } as any);
|
||||
|
||||
expect(view.webContents.getURL()).to.equal('about:blank');
|
||||
});
|
||||
|
||||
describe('BrowserView.setBackgroundColor()', () => {
|
||||
it('does not throw for valid args', () => {
|
||||
view = new BrowserView();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue