refactor: port window.open and window.opener to use ctx bridge instead of hole punching (#23235)
* refactor: port window.open and window.opener to use ctx bridge instead of hole punching * refactor: only run the isolated init bundle when webview is enabled
This commit is contained in:
parent
c68589f212
commit
abe5cf398c
11 changed files with 178 additions and 85 deletions
|
@ -65,13 +65,6 @@ describe('chromium feature', () => {
|
|||
});
|
||||
|
||||
describe('window.open', () => {
|
||||
it('returns a BrowserWindowProxy object', () => {
|
||||
const b = window.open('about:blank', '', 'show=no');
|
||||
expect(b.closed).to.be.false();
|
||||
expect(b.constructor.name).to.equal('BrowserWindowProxy');
|
||||
b.close();
|
||||
});
|
||||
|
||||
it('accepts "nodeIntegration" as feature', (done) => {
|
||||
let b = null;
|
||||
listener = (event) => {
|
||||
|
@ -198,8 +191,8 @@ describe('chromium feature', () => {
|
|||
let b = null;
|
||||
listener = (event) => {
|
||||
window.removeEventListener('message', listener);
|
||||
expect(event.source).to.deep.equal(b);
|
||||
b.close();
|
||||
expect(event.source).to.equal(b);
|
||||
expect(event.origin).to.equal('file://');
|
||||
done();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue