mirror of https://github.com/google/oss-fuzz.git
[htmlunit] don't report non existing linked resources as error (#10194)
This commit is contained in:
parent
4c9f065f39
commit
b0b6998a71
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue