👷 Add a spec

This commit is contained in:
Felix Rieseberg 2017-11-22 14:37:46 -08:00
parent 8c5aad8b17
commit 14db204315

View file

@ -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()