Add test for webview zoomFactor inheritance

This commit is contained in:
Kevin Sawicki 2016-05-19 14:46:11 -07:00
parent 4754e4aabb
commit b09c81202a
3 changed files with 28 additions and 0 deletions

View file

@ -852,4 +852,19 @@ describe('<webview> tag', function () {
document.body.appendChild(webview)
})
})
it('inherits the zoomFactor of the parent window', function (done) {
w = new BrowserWindow({
show: false,
webPreferences: {
zoomFactor: 1.2
}
})
ipcMain.once('pong', function (event, zoomFactor, zoomLevel) {
assert.equal(zoomFactor, 1.2)
assert.equal(zoomLevel, 1)
done()
})
w.loadURL('file://' + fixtures + '/pages/webview-zoom-factor.html')
})
})