Revert "fix: Fix menu.popup() bugs"

This commit is contained in:
Alexey Kuzmin 2017-12-12 13:59:34 +03:00 committed by GitHub
parent 19f1fef040
commit 1c8eb03574
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 76 deletions

View file

@ -283,52 +283,7 @@ describe('Menu module', () => {
})
it('returns immediately', () => {
const { browserWindow, x, y } = menu.popup(w, {x: 100, y: 101})
assert.equal(browserWindow, w)
assert.equal(x, 100)
assert.equal(y, 101)
menu.closePopup(w)
})
it('works without a given BrowserWindow and options', () => {
const { browserWindow, x, y } = menu.popup({x: 100, y: 101})
assert.equal(browserWindow.constructor.name, 'BrowserWindow')
assert.equal(x, 100)
assert.equal(y, 101)
menu.closePopup()
})
it('works without a given BrowserWindow', () => {
const { browserWindow, x, y } = menu.popup(100, 101)
assert.equal(browserWindow.constructor.name, 'BrowserWindow')
assert.equal(x, 100)
assert.equal(y, 101)
menu.closePopup()
})
it('works without a given BrowserWindow and 0 options', () => {
const { browserWindow, x, y } = menu.popup(0, 1)
assert.equal(browserWindow.constructor.name, 'BrowserWindow')
assert.equal(x, 0)
assert.equal(y, 1)
menu.closePopup()
})
it('works with a given BrowserWindow and no options', () => {
const { browserWindow, x, y } = menu.popup(w, 100, 101)
assert.equal(browserWindow, w)
assert.equal(x, 100)
assert.equal(y, 101)
menu.popup(w, {x: 100, y: 100, async: true})
menu.closePopup(w)
})
})