feat(chromium): add new omitBackground form field (closes #226)

This commit is contained in:
Julien Neuhart
2022-10-21 10:41:40 +02:00
parent 921b6b7ba4
commit f89726752f
4 changed files with 102 additions and 4 deletions

View File

@@ -335,6 +335,24 @@ func TestChromium_PDF(t *testing.T) {
EmulatedMediaType: "print",
},
},
{
name: "with omit background but not print background",
timeout: time.Duration(60) * time.Second,
URL: "file:///tests/test/testdata/chromium/html/sample4/index.html",
options: Options{
OmitBackground: true,
},
expectErr: true,
},
{
name: "with omit background and print background",
timeout: time.Duration(60) * time.Second,
URL: "file:///tests/test/testdata/chromium/html/sample4/index.html",
options: Options{
OmitBackground: true,
PrintBackground: true,
},
},
{
name: "with extra script tags",
timeout: time.Duration(60) * time.Second,