Add test for webview zoomFactor inheritance
This commit is contained in:
parent
4754e4aabb
commit
b09c81202a
3 changed files with 28 additions and 0 deletions
|
@ -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')
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue