mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-17 04:32:15 +01:00
feat(chromium): add --chromium-disable-javascript property (fixes #175)
This commit is contained in:
@@ -238,6 +238,7 @@ func TestChromium_PDF(t *testing.T) {
|
||||
proxyServer string
|
||||
allowList *regexp.Regexp
|
||||
denyList *regexp.Regexp
|
||||
disableJavaScript bool
|
||||
expectErr bool
|
||||
}{
|
||||
{
|
||||
@@ -256,6 +257,10 @@ func TestChromium_PDF(t *testing.T) {
|
||||
UserAgent: "foo",
|
||||
},
|
||||
},
|
||||
{
|
||||
URL: "file:///tests/test/testdata/chromium/html/sample9/index.html",
|
||||
disableJavaScript: true,
|
||||
},
|
||||
{
|
||||
URL: "file:///tests/test/testdata/chromium/html/sample4/index.html",
|
||||
options: Options{
|
||||
@@ -412,6 +417,7 @@ func TestChromium_PDF(t *testing.T) {
|
||||
|
||||
mod.allowList = tc.allowList
|
||||
mod.denyList = tc.denyList
|
||||
mod.disableJavaScript = tc.disableJavaScript
|
||||
|
||||
outputDir, err := gotenberg.MkdirAll()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user