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

Side by Side Diff: gpu/config/gpu_driver_bug_list_unittest.cc

Issue 682743002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "gpu/config/gpu_control_list_jsons.h" 8 #include "gpu/config/gpu_control_list_jsons.h"
9 #include "gpu/config/gpu_driver_bug_list.h" 9 #include "gpu/config/gpu_driver_bug_list.h"
10 #include "gpu/config/gpu_driver_bug_workaround_type.h" 10 #include "gpu/config/gpu_driver_bug_workaround_type.h"
11 #include "gpu/config/gpu_info.h" 11 #include "gpu/config/gpu_info.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 #define LONG_STRING_CONST(...) #__VA_ARGS__ 14 #define LONG_STRING_CONST(...) #__VA_ARGS__
15 15
16 namespace gpu { 16 namespace gpu {
17 17
18 class GpuDriverBugListTest : public testing::Test { 18 class GpuDriverBugListTest : public testing::Test {
19 public: 19 public:
20 GpuDriverBugListTest() { } 20 GpuDriverBugListTest() { }
21 21
22 virtual ~GpuDriverBugListTest() { } 22 ~GpuDriverBugListTest() override {}
23 23
24 const GPUInfo& gpu_info() const { 24 const GPUInfo& gpu_info() const {
25 return gpu_info_; 25 return gpu_info_;
26 } 26 }
27 27
28 protected: 28 protected:
29 virtual void SetUp() { 29 void SetUp() override {
30 gpu_info_.gpu.vendor_id = 0x10de; 30 gpu_info_.gpu.vendor_id = 0x10de;
31 gpu_info_.gpu.device_id = 0x0640; 31 gpu_info_.gpu.device_id = 0x0640;
32 gpu_info_.driver_vendor = "NVIDIA"; 32 gpu_info_.driver_vendor = "NVIDIA";
33 gpu_info_.driver_version = "1.6.18"; 33 gpu_info_.driver_version = "1.6.18";
34 gpu_info_.driver_date = "7-14-2009"; 34 gpu_info_.driver_date = "7-14-2009";
35 gpu_info_.machine_model_name = "MacBookPro"; 35 gpu_info_.machine_model_name = "MacBookPro";
36 gpu_info_.machine_model_version = "7.1"; 36 gpu_info_.machine_model_version = "7.1";
37 gpu_info_.gl_vendor = "NVIDIA Corporation"; 37 gpu_info_.gl_vendor = "NVIDIA Corporation";
38 gpu_info_.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine"; 38 gpu_info_.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine";
39 gpu_info_.performance_stats.graphics = 5.0; 39 gpu_info_.performance_stats.graphics = 5.0;
40 gpu_info_.performance_stats.gaming = 5.0; 40 gpu_info_.performance_stats.gaming = 5.0;
41 gpu_info_.performance_stats.overall = 5.0; 41 gpu_info_.performance_stats.overall = 5.0;
42 } 42 }
43 43
44 virtual void TearDown() { 44 void TearDown() override {}
45 }
46 45
47 private: 46 private:
48 GPUInfo gpu_info_; 47 GPUInfo gpu_info_;
49 }; 48 };
50 49
51 TEST_F(GpuDriverBugListTest, CurrentDriverBugListValidation) { 50 TEST_F(GpuDriverBugListTest, CurrentDriverBugListValidation) {
52 scoped_ptr<GpuDriverBugList> list(GpuDriverBugList::Create()); 51 scoped_ptr<GpuDriverBugList> list(GpuDriverBugList::Create());
53 std::string json; 52 std::string json;
54 EXPECT_TRUE(list->LoadList(kGpuDriverBugListJson, GpuControlList::kAllOs)); 53 EXPECT_TRUE(list->LoadList(kGpuDriverBugListJson, GpuControlList::kAllOs));
55 } 54 }
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 EXPECT_EQ(1u, bugs.count(DISABLE_D3D11)); 202 EXPECT_EQ(1u, bugs.count(DISABLE_D3D11));
204 203
205 // test a higher driver version number 204 // test a higher driver version number
206 gpu_info.driver_version = "9.18.13.2723"; 205 gpu_info.driver_version = "9.18.13.2723";
207 bugs = list->MakeDecision(GpuControlList::kOsWin, "7.0", gpu_info); 206 bugs = list->MakeDecision(GpuControlList::kOsWin, "7.0", gpu_info);
208 EXPECT_EQ(0u, bugs.count(DISABLE_D3D11)); 207 EXPECT_EQ(0u, bugs.count(DISABLE_D3D11));
209 } 208 }
210 209
211 } // namespace gpu 210 } // namespace gpu
212 211
OLDNEW
« no previous file with comments | « gpu/config/gpu_control_list_version_info_unittest.cc ('k') | gpu/config/gpu_info_collector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698