refactor: try just using regular [Sync] for MessageSync (#20797)

This commit is contained in:
Jeremy Apthorp 2019-12-17 11:35:28 -08:00 committed by GitHub
parent 6cc9f0c34e
commit 54b4756a29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 106 deletions

View file

@ -595,13 +595,11 @@ describe('BrowserWindow module', () => {
})
describe('BrowserWindow.getFocusedWindow()', () => {
it('returns the opener window when dev tools window is focused', (done) => {
it('returns the opener window when dev tools window is focused', async () => {
w.show()
w.webContents.once('devtools-focused', () => {
expect(BrowserWindow.getFocusedWindow()).to.equal(w)
done()
})
w.webContents.openDevTools({ mode: 'undocked' })
await emittedOnce(w.webContents, 'devtools-focused')
expect(BrowserWindow.getFocusedWindow()).to.equal(w)
})
})