OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <iostream> | 5 #include <iostream> |
6 #include <set> | 6 #include <set> |
7 #include <string> | 7 #include <string> |
8 #include <tuple> | 8 #include <tuple> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1503 return true; | 1503 return true; |
1504 } | 1504 } |
1505 }; | 1505 }; |
1506 | 1506 |
1507 template <> | 1507 template <> |
1508 struct FuzzTraits<printing::PdfRenderSettings> { | 1508 struct FuzzTraits<printing::PdfRenderSettings> { |
1509 static bool Fuzz(printing::PdfRenderSettings* p, Fuzzer* fuzzer) { | 1509 static bool Fuzz(printing::PdfRenderSettings* p, Fuzzer* fuzzer) { |
1510 gfx::Rect area = p->area; | 1510 gfx::Rect area = p->area; |
1511 int dpi = p->dpi; | 1511 int dpi = p->dpi; |
1512 bool autorotate = p->autorotate; | 1512 bool autorotate = p->autorotate; |
| 1513 printing::PdfRenderSettings::Mode mode = p->mode; |
1513 if (!FuzzParam(&area, fuzzer)) | 1514 if (!FuzzParam(&area, fuzzer)) |
1514 return false; | 1515 return false; |
1515 if (!FuzzParam(&dpi, fuzzer)) | 1516 if (!FuzzParam(&dpi, fuzzer)) |
1516 return false; | 1517 return false; |
1517 if (!FuzzParam(&autorotate, fuzzer)) | 1518 if (!FuzzParam(&autorotate, fuzzer)) |
1518 return false; | 1519 return false; |
1519 *p = printing::PdfRenderSettings(area, dpi, autorotate); | 1520 if (!FuzzParam(&mode, fuzzer)) |
| 1521 return false; |
| 1522 *p = printing::PdfRenderSettings(area, dpi, autorotate, mode); |
1520 return true; | 1523 return true; |
1521 } | 1524 } |
1522 }; | 1525 }; |
1523 | 1526 |
1524 template <> | 1527 template <> |
1525 struct FuzzTraits<SkBitmap> { | 1528 struct FuzzTraits<SkBitmap> { |
1526 static bool Fuzz(SkBitmap* p, Fuzzer* fuzzer) { | 1529 static bool Fuzz(SkBitmap* p, Fuzzer* fuzzer) { |
1527 // TODO(mbarbella): This should actually do something. | 1530 // TODO(mbarbella): This should actually do something. |
1528 return true; | 1531 return true; |
1529 } | 1532 } |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1840 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" | 1843 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" |
1841 #undef IPC_MESSAGE_DECL | 1844 #undef IPC_MESSAGE_DECL |
1842 #define IPC_MESSAGE_DECL(name, ...) \ | 1845 #define IPC_MESSAGE_DECL(name, ...) \ |
1843 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz; | 1846 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz; |
1844 | 1847 |
1845 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { | 1848 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { |
1846 #include "tools/ipc_fuzzer/message_lib/all_messages.h" | 1849 #include "tools/ipc_fuzzer/message_lib/all_messages.h" |
1847 } | 1850 } |
1848 | 1851 |
1849 } // namespace ipc_fuzzer | 1852 } // namespace ipc_fuzzer |
OLD | NEW |