New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests - shutdown gracefully to enable webview tests #90508
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor change, should fix the crash 🤞
new Promise(c => { | ||
const testWindow = BrowserWindow.getAllWindows()[0]; | ||
if (testWindow && !testWindow.isDestroyed()) { | ||
testWindow.on('closed', () => c()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would also want to check the validity of testWindow.webContents
and listen to the event accordingly for the reasons mentioned here https://github.com/electron/electron/blob/master/spec-main/window-helpers.ts#L7-L20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deepak1556 ok see my latest commit
I actually think this change does not help: https://github.com/microsoft/vscode/runs/440525717#step:14:456 |
//cc @deepak1556