test: remove workaround for fixed Menu.closePopup issue (#37802)
This commit is contained in:
parent
0b4ef2b1e5
commit
4c8583c365
1 changed files with 3 additions and 12 deletions
|
@ -817,11 +817,8 @@ describe('Menu module', function () {
|
||||||
it('should emit menu-will-close event', (done) => {
|
it('should emit menu-will-close event', (done) => {
|
||||||
menu.on('menu-will-close', () => { done(); });
|
menu.on('menu-will-close', () => { done(); });
|
||||||
menu.popup({ window: w });
|
menu.popup({ window: w });
|
||||||
// https://github.com/electron/electron/issues/19411
|
|
||||||
setTimeout().then(() => {
|
|
||||||
menu.closePopup();
|
menu.closePopup();
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
it('returns immediately', () => {
|
it('returns immediately', () => {
|
||||||
const input = { window: w, x: 100, y: 101 };
|
const input = { window: w, x: 100, y: 101 };
|
||||||
|
@ -849,19 +846,13 @@ describe('Menu module', function () {
|
||||||
|
|
||||||
expect(x).to.equal(100);
|
expect(x).to.equal(100);
|
||||||
expect(y).to.equal(101);
|
expect(y).to.equal(101);
|
||||||
// https://github.com/electron/electron/issues/19411
|
|
||||||
setTimeout().then(() => {
|
|
||||||
menu.closePopup();
|
menu.closePopup();
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
it('works with a given BrowserWindow, no options, and a callback', (done) => {
|
it('works with a given BrowserWindow, no options, and a callback', (done) => {
|
||||||
menu.popup({ window: w, callback: () => done() });
|
menu.popup({ window: w, callback: () => done() });
|
||||||
// https://github.com/electron/electron/issues/19411
|
|
||||||
setTimeout().then(() => {
|
|
||||||
menu.closePopup();
|
menu.closePopup();
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
it('prevents menu from getting garbage-collected when popuping', async () => {
|
it('prevents menu from getting garbage-collected when popuping', async () => {
|
||||||
const menu = Menu.buildFromTemplate([{ role: 'paste' }]);
|
const menu = Menu.buildFromTemplate([{ role: 'paste' }]);
|
||||||
|
|
Loading…
Add table
Reference in a new issue