Fix smoke tests

Fixes #77670
This commit is contained in:
Daniel Imms
2019-07-24 17:35:56 -07:00
parent a9aac1207b
commit d4b3a7a22f

View File

@@ -167,9 +167,11 @@ export class CodeApplication extends Disposable {
event.preventDefault();
});
app.on('remote-get-current-web-contents', event => {
this.logService.trace(`App#on(remote-get-current-web-contents): prevented`);
event.preventDefault();
// The driver needs access to web contents
if (!this.environmentService.args.driver) {
this.logService.trace(`App#on(remote-get-current-web-contents): prevented`);
event.preventDefault();
}
});
app.on('web-contents-created', (_event: Electron.Event, contents) => {
contents.on('will-attach-webview', (event: Electron.Event, webPreferences, params) => {