mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
Fuzzers: Fix FuzzCSSParser build
This commit is contained in:
parent
3905d54a9c
commit
18ca15b2cc
1 changed files with 5 additions and 1 deletions
|
@ -7,11 +7,15 @@
|
|||
#include <LibCore/EventLoop.h>
|
||||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
Core::EventLoop loop;
|
||||
auto document = Web::DOM::Document::create();
|
||||
auto vm = JS::VM::create();
|
||||
auto realm = JS::Realm::create(*vm);
|
||||
auto window = Web::HTML::Window::create(*realm);
|
||||
auto document = Web::DOM::Document::create(*window);
|
||||
(void)Web::parse_css_stylesheet(Web::CSS::Parser::ParsingContext(document), { data, size });
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue