refactor: printToPDF should be headless (#33654)
This commit is contained in:
parent
0d69067dee
commit
93b39b92b5
17 changed files with 648 additions and 414 deletions
|
@ -1110,14 +1110,16 @@ describe('<webview> tag', function () {
|
|||
ifdescribe(features.isPrintingEnabled())('<webview>.printToPDF()', () => {
|
||||
it('rejects on incorrectly typed parameters', async () => {
|
||||
const badTypes = {
|
||||
marginsType: 'terrible',
|
||||
scaleFactor: 'not-a-number',
|
||||
landscape: [],
|
||||
pageRanges: { oops: 'im-not-the-right-key' },
|
||||
headerFooter: '123',
|
||||
printSelectionOnly: 1,
|
||||
displayHeaderFooter: '123',
|
||||
printBackground: 2,
|
||||
pageSize: 'IAmAPageSize'
|
||||
scale: 'not-a-number',
|
||||
pageSize: 'IAmAPageSize',
|
||||
margins: 'terrible',
|
||||
pageRanges: { oops: 'im-not-the-right-key' },
|
||||
headerTemplate: [1, 2, 3],
|
||||
footerTemplate: [4, 5, 6],
|
||||
preferCSSPageSize: 'no'
|
||||
};
|
||||
|
||||
// These will hard crash in Chromium unless we type-check
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue