feat(chromium): add new form field 'failOnConsoleExceptions' (fixes #262)

This commit is contained in:
Julien Neuhart
2021-11-23 15:43:05 +01:00
parent 99ede6477f
commit df98e7512b
6 changed files with 148 additions and 40 deletions

View File

@@ -622,6 +622,21 @@ func TestConvertURL(t *testing.T) {
expectHTTPErr: true,
expectHTTPStatus: http.StatusBadRequest,
},
{
ctx: &api.MockContext{Context: &api.Context{}},
api: func() API {
chromiumAPI := struct{ ProtoAPI }{}
chromiumAPI.pdf = func(_ context.Context, _ *zap.Logger, _, _ string, _ Options) error {
return ErrConsoleExceptions
}
return chromiumAPI
}(),
options: DefaultOptions(),
expectErr: true,
expectHTTPErr: true,
expectHTTPStatus: http.StatusConflict,
},
{
ctx: &api.MockContext{Context: &api.Context{}},
api: func() API {