👷 Add a spec
This commit is contained in:
parent
8c5aad8b17
commit
14db204315
1 changed files with 20 additions and 1 deletions
|
@ -9,7 +9,7 @@ const http = require('http')
|
|||
const {closeWindow} = require('./window-helpers')
|
||||
|
||||
const {ipcRenderer, remote, screen} = require('electron')
|
||||
const {app, ipcMain, BrowserWindow, protocol, webContents} = remote
|
||||
const {app, ipcMain, BrowserWindow, BrowserView, protocol, webContents} = remote
|
||||
|
||||
const isCI = remote.getGlobal('isCi')
|
||||
const nativeModulesEnabled = remote.getGlobal('nativeModulesEnabled')
|
||||
|
@ -802,6 +802,25 @@ describe('BrowserWindow module', () => {
|
|||
})
|
||||
})
|
||||
|
||||
describe('BrowserWindow.fromBrowserView(browserView)', () => {
|
||||
let bv = null
|
||||
|
||||
beforeEach(() => {
|
||||
bv = new BrowserView()
|
||||
w.setBrowserView(bv)
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
w.setBrowserView(null)
|
||||
bv.destroy()
|
||||
})
|
||||
|
||||
it('returns the window with the browserView', () => {
|
||||
assert.equal(BrowserWindow.fromBrowserView(bv).id, w.id)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('BrowserWindow.setOpacity(opacity)', () => {
|
||||
it('make window with initial opacity', () => {
|
||||
w.destroy()
|
||||
|
|
Loading…
Reference in a new issue