fix: crash on custom printing margins (#22164)
This commit is contained in:
parent
f97ce86d08
commit
6ed396df17
2 changed files with 18 additions and 6 deletions
|
@ -135,9 +135,18 @@ describe('webContents module', () => {
|
|||
}).to.throw('Unsupported pageSize: i-am-a-bad-pagesize')
|
||||
})
|
||||
|
||||
it('does not crash', () => {
|
||||
it('does not crash with custom margins', () => {
|
||||
expect(() => {
|
||||
w.webContents.print({ silent: true })
|
||||
w.webContents.print({
|
||||
silent: true,
|
||||
margins: {
|
||||
marginType: 'custom',
|
||||
top: 1,
|
||||
bottom: 1,
|
||||
left: 1,
|
||||
right: 1
|
||||
}
|
||||
})
|
||||
}).to.not.throw()
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue