mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-19 13:42:15 +01:00
feat(chromium): skipNetworkIdleEvent is now true by default
This commit is contained in:
@@ -379,7 +379,7 @@ func TestChromiumBrowser_pdf(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
scenario: "skip networkIdle event",
|
scenario: "do not skip networkIdle event",
|
||||||
browser: newChromiumBrowser(
|
browser: newChromiumBrowser(
|
||||||
browserArguments{
|
browserArguments{
|
||||||
binPath: os.Getenv("CHROMIUM_BIN_PATH"),
|
binPath: os.Getenv("CHROMIUM_BIN_PATH"),
|
||||||
@@ -404,13 +404,13 @@ func TestChromiumBrowser_pdf(t *testing.T) {
|
|||||||
return fs
|
return fs
|
||||||
}(),
|
}(),
|
||||||
options: PdfOptions{
|
options: PdfOptions{
|
||||||
Options: Options{SkipNetworkIdleEvent: true},
|
Options: Options{SkipNetworkIdleEvent: false},
|
||||||
},
|
},
|
||||||
noDeadline: false,
|
noDeadline: false,
|
||||||
start: true,
|
start: true,
|
||||||
expectError: false,
|
expectError: false,
|
||||||
expectedLogEntries: []string{
|
expectedLogEntries: []string{
|
||||||
"skipping network idle event",
|
"event networkIdle fired",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1225,6 +1225,7 @@ func TestChromiumBrowser_pdf(t *testing.T) {
|
|||||||
"no cookies to set",
|
"no cookies to set",
|
||||||
"no extra HTTP headers",
|
"no extra HTTP headers",
|
||||||
"navigate to",
|
"navigate to",
|
||||||
|
"skipping network idle event",
|
||||||
"default white background not hidden",
|
"default white background not hidden",
|
||||||
"no emulated media type",
|
"no emulated media type",
|
||||||
"no wait delay",
|
"no wait delay",
|
||||||
@@ -1452,7 +1453,7 @@ func TestChromiumBrowser_screenshot(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
scenario: "skip networkIdle event",
|
scenario: "do not skip networkIdle event",
|
||||||
browser: newChromiumBrowser(
|
browser: newChromiumBrowser(
|
||||||
browserArguments{
|
browserArguments{
|
||||||
binPath: os.Getenv("CHROMIUM_BIN_PATH"),
|
binPath: os.Getenv("CHROMIUM_BIN_PATH"),
|
||||||
@@ -1477,13 +1478,13 @@ func TestChromiumBrowser_screenshot(t *testing.T) {
|
|||||||
return fs
|
return fs
|
||||||
}(),
|
}(),
|
||||||
options: ScreenshotOptions{
|
options: ScreenshotOptions{
|
||||||
Options: Options{SkipNetworkIdleEvent: true},
|
Options: Options{SkipNetworkIdleEvent: false},
|
||||||
},
|
},
|
||||||
noDeadline: false,
|
noDeadline: false,
|
||||||
start: true,
|
start: true,
|
||||||
expectError: false,
|
expectError: false,
|
||||||
expectedLogEntries: []string{
|
expectedLogEntries: []string{
|
||||||
"skipping network idle event",
|
"event networkIdle fired",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -2184,6 +2185,7 @@ func TestChromiumBrowser_screenshot(t *testing.T) {
|
|||||||
"no user agent override",
|
"no user agent override",
|
||||||
"no extra HTTP headers",
|
"no extra HTTP headers",
|
||||||
"navigate to",
|
"navigate to",
|
||||||
|
"skipping network idle event",
|
||||||
"default white background not hidden",
|
"default white background not hidden",
|
||||||
"no emulated media type",
|
"no emulated media type",
|
||||||
"no wait delay",
|
"no wait delay",
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ type Options struct {
|
|||||||
// DefaultOptions returns the default values for Options.
|
// DefaultOptions returns the default values for Options.
|
||||||
func DefaultOptions() Options {
|
func DefaultOptions() Options {
|
||||||
return Options{
|
return Options{
|
||||||
SkipNetworkIdleEvent: false,
|
SkipNetworkIdleEvent: true,
|
||||||
FailOnHttpStatusCodes: []int64{499, 599},
|
FailOnHttpStatusCodes: []int64{499, 599},
|
||||||
FailOnConsoleExceptions: false,
|
FailOnConsoleExceptions: false,
|
||||||
WaitDelay: 0,
|
WaitDelay: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user