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

Side by Side Diff: ui/display/util/edid_parser_fuzzer.cc

Issue 2523663002: Remove remaining base dependencies from base/numerics (Closed)
Patch Set: fix gcc compile Created 4 years 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 unified diff | Download patch
« no previous file with comments | « gpu/command_buffer/tests/gl_test_utils.cc ('k') | ui/gfx/geometry/rect.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h"
10 #include "ui/display/util/edid_parser.h" 11 #include "ui/display/util/edid_parser.h"
11 #include "ui/gfx/geometry/size.h" 12 #include "ui/gfx/geometry/size.h"
12 13
13 struct Environment { 14 struct Environment {
14 Environment() { 15 Environment() {
15 logging::SetMinLogLevel(logging::LOG_FATAL); 16 logging::SetMinLogLevel(logging::LOG_FATAL);
16 } 17 }
17 }; 18 };
18 19
19 Environment* env = new Environment(); 20 Environment* env = new Environment();
20 21
21 // Entry point for LibFuzzer. 22 // Entry point for LibFuzzer.
22 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 23 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
23 std::vector<uint8_t> edid; 24 std::vector<uint8_t> edid;
24 edid.assign(data, data + size); 25 edid.assign(data, data + size);
25 uint16_t manufacturer_id, product_code; 26 uint16_t manufacturer_id, product_code;
26 std::string human_readable_name; 27 std::string human_readable_name;
27 gfx::Size active_pixel_size, physical_display_size; 28 gfx::Size active_pixel_size, physical_display_size;
28 bool overscan; 29 bool overscan;
29 30
30 display::ParseOutputDeviceData(edid, &manufacturer_id, &product_code, 31 display::ParseOutputDeviceData(edid, &manufacturer_id, &product_code,
31 &human_readable_name, &active_pixel_size, 32 &human_readable_name, &active_pixel_size,
32 &physical_display_size); 33 &physical_display_size);
33 34
34 display::ParseOutputOverscanFlag(edid, &overscan); 35 display::ParseOutputOverscanFlag(edid, &overscan);
35 return 0; 36 return 0;
36 } 37 }
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_test_utils.cc ('k') | ui/gfx/geometry/rect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698