mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
Fuzzers: Fix FuzzCSSParser build
This commit is contained in:
parent
3905d54a9c
commit
18ca15b2cc
Notes:
sideshowbarker
2024-07-17 07:27:04 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/18ca15b2cc Pull-request: https://github.com/SerenityOS/serenity/pull/14816 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/linusg ✅
@ -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…
Reference in New Issue
Block a user