| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include <stddef.h> |
| 6 #include <stdint.h> |
| 7 #include <vector> |
| 8 |
| 9 #include "content/browser/browsing_data/clear_site_data_throttle.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 class ClearSiteDataFuzzerTest { |
| 14 public: |
| 15 ClearSiteDataFuzzerTest() : throttle_(nullptr) {} |
| 16 |
| 17 void TestHeader(const std::string& header) { |
| 18 bool remove_cookies; |
| 19 bool remove_storage; |
| 20 bool remove_cache; |
| 21 std::vector<content::ClearSiteDataThrottle::ConsoleMessage> messages; |
| 22 |
| 23 throttle_.ParseHeader(header, &remove_cookies, &remove_storage, |
| 24 &remove_cache, &messages); |
| 25 } |
| 26 |
| 27 private: |
| 28 content::ClearSiteDataThrottle throttle_; |
| 29 }; |
| 30 |
| 31 ClearSiteDataFuzzerTest* test = new ClearSiteDataFuzzerTest(); |
| 32 |
| 33 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
| 34 test->TestHeader(std::string(reinterpret_cast<const char*>(data), size)); |
| 35 return 0; |
| 36 } |
| 37 |
| 38 } // namespace content |
| OLD | NEW |