Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1255)

Unified Diff: third_party/WebKit/Source/platform/testing/BlinkFuzzerTestSupport.cpp

Issue 2274563002: Add fuzzer infra to blink and fuzz CSS parser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/testing/BlinkFuzzerTestSupport.cpp
diff --git a/third_party/WebKit/Source/platform/testing/BlinkFuzzerTestSupport.cpp b/third_party/WebKit/Source/platform/testing/BlinkFuzzerTestSupport.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..eeb401244c1595b4d41555b40ef9f5d0b8e5f7b9
--- /dev/null
+++ b/third_party/WebKit/Source/platform/testing/BlinkFuzzerTestSupport.cpp
@@ -0,0 +1,30 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "platform/testing/BlinkFuzzerTestSupport.h"
+
+#include "base/at_exit.h"
+#include "base/command_line.h"
+#include "mojo/edk/embedder/embedder.h"
+#include "platform/weborigin/SchemeRegistry.h"
+#include <content/test/blink_test_environment.h>
+
+namespace blink {
+
+void InitializeBlinkFuzzTest(int* argc, char ***argv)
+{
+ // Note: we don't tear anything down here after an iteration of the fuzzer
+ // is complete, this is for efficiency. We rerun the fuzzer with the same
+ // environment as the previous iteration.
+ base::AtExitManager atExit;
+
+ mojo::edk::Init();
+ base::CommandLine::Init(*argc, *argv);
+
+ content::SetUpBlinkTestEnvironment();
+
+ blink::SchemeRegistry::initialize();
+}
+
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/testing/BlinkFuzzerTestSupport.h ('k') | third_party/WebKit/Source/platform/testing/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698