feat(chromium): add 'extraLinkTags' and 'extraScriptTags' form fields, add auto-detection of files for URL endpoint, disable some functionalities if JavaScript is disabled

This commit is contained in:
Julien Neuhart
2021-11-24 16:20:10 +01:00
parent 26e97358d1
commit 415e2ff265
8 changed files with 613 additions and 14 deletions

View File

@@ -276,6 +276,19 @@ func TestChromium_PDF(t *testing.T) {
},
},
},
{
URL: "file:///tests/test/testdata/chromium/html/sample11/index.html",
options: Options{
ExtraLinkTags: []LinkTag{
{
Href: "font.woff",
},
{
Href: "style.css",
},
},
},
},
{
URL: "file:///tests/test/testdata/chromium/html/sample8/index.html",
options: Options{
@@ -295,6 +308,16 @@ func TestChromium_PDF(t *testing.T) {
EmulatedMediaType: "print",
},
},
{
URL: "file:///tests/test/testdata/chromium/html/sample11/index.html",
options: Options{
ExtraScriptTags: []ScriptTag{
{
Src: "script.js",
},
},
},
},
{
URL: "file:///tests/test/testdata/chromium/html/sample4/index.html",
options: Options{