[htmlunit] don't report non existing linked resources as error (#10194)

This commit is contained in:
RBRi 2023-05-01 14:04:24 +02:00 committed by GitHub
parent 4c9f065f39
commit b0b6998a71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -46,11 +46,10 @@ public class HtmlParserFuzzer {
void test() {
try (WebClient webClient = new WebClient(getBrowserVersion())) {
/*
* net.sourceforge.htmlunit.corejs.javascript.EvaluatorException
* seems to be fatal
*/
// org.htmlunit.corejs.javascript.EvaluatorException seems to be fatal
webClient.getOptions().setThrowExceptionOnScriptError(false);
// no exception if linked resources are not available
webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
webClient.loadHtmlCodeIntoCurrentWindow(fuzzedDataProvider.consumeRemainingAsString());
} catch (IllegalArgumentException e) {