MM-51850 - Calls: Fix for crash after closing popout (#2647)
This commit is contained in:

committed by
GitHub

parent
a6f153b55a
commit
4fe66b298d
@@ -531,6 +531,23 @@ describe('main/windows/callsWidgetWindow', () => {
|
||||
expect(popOut.webContents.on).toHaveBeenCalledWith('will-redirect', widgetWindow.onWillRedirect);
|
||||
});
|
||||
|
||||
it('onPopOutClosed', () => {
|
||||
const widgetWindow = new CallsWidgetWindow(mainWindow, mainView, widgetConfig);
|
||||
expect(widgetWindow.popOut).toBeNull();
|
||||
|
||||
const popOut = new EventEmitter();
|
||||
popOut.webContents = {
|
||||
on: jest.fn(),
|
||||
id: 'webContentsId',
|
||||
};
|
||||
|
||||
widgetWindow.onPopOutCreate(popOut);
|
||||
expect(widgetWindow.popOut).toBe(popOut);
|
||||
|
||||
popOut.emit('closed');
|
||||
expect(widgetWindow.popOut).toBeNull();
|
||||
});
|
||||
|
||||
it('getWebContentsId', () => {
|
||||
baseWindow.webContents = {
|
||||
...baseWindow.webContents,
|
||||
|
Reference in New Issue
Block a user