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

Side by Side Diff: chrome/browser/safe_browsing/pe_image_reader_win_unittest.cc

Issue 629603002: replace OVERRIDE and FINAL with override and final in chrome/browser/[r-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/files/file_path.h" 5 #include "base/files/file_path.h"
6 #include "base/files/memory_mapped_file.h" 6 #include "base/files/memory_mapped_file.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "chrome/browser/safe_browsing/pe_image_reader_win.h" 8 #include "chrome/browser/safe_browsing/pe_image_reader_win.h"
9 #include "chrome/common/chrome_paths.h" 9 #include "chrome/common/chrome_paths.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 struct TestData { 12 struct TestData {
13 const char* filename; 13 const char* filename;
14 safe_browsing::PeImageReader::WordSize word_size; 14 safe_browsing::PeImageReader::WordSize word_size;
15 WORD machine_identifier; 15 WORD machine_identifier;
16 WORD optional_header_size; 16 WORD optional_header_size;
17 size_t number_of_sections; 17 size_t number_of_sections;
18 size_t number_of_debug_entries; 18 size_t number_of_debug_entries;
19 }; 19 };
20 20
21 // A test fixture parameterized on test data containing the name of a PE image 21 // A test fixture parameterized on test data containing the name of a PE image
22 // to parse and the expected values to be read from it. The file is read from 22 // to parse and the expected values to be read from it. The file is read from
23 // the src/chrome/test/data/safe_browsing directory. 23 // the src/chrome/test/data/safe_browsing directory.
24 class PeImageReaderTest : public testing::TestWithParam<const TestData*> { 24 class PeImageReaderTest : public testing::TestWithParam<const TestData*> {
25 protected: 25 protected:
26 PeImageReaderTest() : expected_data_(GetParam()) {} 26 PeImageReaderTest() : expected_data_(GetParam()) {}
27 27
28 virtual void SetUp() OVERRIDE { 28 virtual void SetUp() override {
29 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_file_path_)); 29 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_file_path_));
30 data_file_path_ = data_file_path_.AppendASCII("safe_browsing"); 30 data_file_path_ = data_file_path_.AppendASCII("safe_browsing");
31 data_file_path_ = data_file_path_.AppendASCII(expected_data_->filename); 31 data_file_path_ = data_file_path_.AppendASCII(expected_data_->filename);
32 32
33 ASSERT_TRUE(data_file_.Initialize(data_file_path_)); 33 ASSERT_TRUE(data_file_.Initialize(data_file_path_));
34 34
35 ASSERT_TRUE(image_reader_.Initialize(data_file_.data(), 35 ASSERT_TRUE(image_reader_.Initialize(data_file_.data(),
36 data_file_.length())); 36 data_file_.length()));
37 } 37 }
38 38
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 }; 148 };
149 149
150 } // namespace 150 } // namespace
151 151
152 INSTANTIATE_TEST_CASE_P(WordSize32, 152 INSTANTIATE_TEST_CASE_P(WordSize32,
153 PeImageReaderTest, 153 PeImageReaderTest,
154 testing::Values(&kTestData[0])); 154 testing::Values(&kTestData[0]));
155 INSTANTIATE_TEST_CASE_P(WordSize64, 155 INSTANTIATE_TEST_CASE_P(WordSize64,
156 PeImageReaderTest, 156 PeImageReaderTest,
157 testing::Values(&kTestData[1])); 157 testing::Values(&kTestData[1]));
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/pe_image_reader_win.cc ('k') | chrome/browser/safe_browsing/ping_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698