| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/testing/BlinkFuzzerTestSupport.h" | 5 #include "platform/testing/BlinkFuzzerTestSupport.h" |
| 6 | 6 |
| 7 #include <content/test/blink_test_environment.h> |
| 7 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
| 8 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 9 #include "base/i18n/icu_util.h" | 10 #include "base/i18n/icu_util.h" |
| 10 #include "platform/weborigin/SchemeRegistry.h" | 11 #include "platform/weborigin/SchemeRegistry.h" |
| 11 #include <content/test/blink_test_environment.h> | |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 BlinkFuzzerTestSupport::BlinkFuzzerTestSupport() | 15 BlinkFuzzerTestSupport::BlinkFuzzerTestSupport() |
| 16 : BlinkFuzzerTestSupport(0, nullptr) {} | 16 : BlinkFuzzerTestSupport(0, nullptr) {} |
| 17 | 17 |
| 18 BlinkFuzzerTestSupport::BlinkFuzzerTestSupport(int argc, char** argv) { | 18 BlinkFuzzerTestSupport::BlinkFuzzerTestSupport(int argc, char** argv) { |
| 19 // Note: we don't tear anything down here after an iteration of the fuzzer | 19 // Note: we don't tear anything down here after an iteration of the fuzzer |
| 20 // is complete, this is for efficiency. We rerun the fuzzer with the same | 20 // is complete, this is for efficiency. We rerun the fuzzer with the same |
| 21 // environment as the previous iteration. | 21 // environment as the previous iteration. |
| 22 base::AtExitManager at_exit; | 22 base::AtExitManager at_exit; |
| 23 | 23 |
| 24 CHECK(base::i18n::InitializeICU()); | 24 CHECK(base::i18n::InitializeICU()); |
| 25 | 25 |
| 26 base::CommandLine::Init(argc, argv); | 26 base::CommandLine::Init(argc, argv); |
| 27 | 27 |
| 28 content::SetUpBlinkTestEnvironment(); | 28 content::SetUpBlinkTestEnvironment(); |
| 29 | 29 |
| 30 blink::SchemeRegistry::Initialize(); | 30 blink::SchemeRegistry::Initialize(); |
| 31 } | 31 } |
| 32 | 32 |
| 33 BlinkFuzzerTestSupport::~BlinkFuzzerTestSupport() = default; | 33 BlinkFuzzerTestSupport::~BlinkFuzzerTestSupport() = default; |
| 34 | 34 |
| 35 } // namespace blink | 35 } // namespace blink |
| OLD | NEW |