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:
Samuel Attard 2020-04-27 12:46:04 -07:00 committed by GitHub
parent c68589f212
commit abe5cf398c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 178 additions and 85 deletions

View file

@ -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();
};