OLD | NEW |
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/json/json_reader.h" | 5 #include "base/json/json_reader.h" |
6 #include "gpu/config/gpu_control_list.h" | 6 #include "gpu/config/gpu_control_list.h" |
7 #include "gpu/config/gpu_info.h" | 7 #include "gpu/config/gpu_info.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
10 #define LONG_STRING_CONST(...) #__VA_ARGS__ | 10 #define LONG_STRING_CONST(...) #__VA_ARGS__ |
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 gpu_info.machine_model_version = ""; | 1075 gpu_info.machine_model_version = ""; |
1076 EXPECT_TRUE(entry->Contains( | 1076 EXPECT_TRUE(entry->Contains( |
1077 GpuControlList::kOsMacosx, "10.6", gpu_info)); | 1077 GpuControlList::kOsMacosx, "10.6", gpu_info)); |
1078 } | 1078 } |
1079 | 1079 |
1080 class GpuControlListEntryDualGPUTest : public GpuControlListEntryTest { | 1080 class GpuControlListEntryDualGPUTest : public GpuControlListEntryTest { |
1081 public: | 1081 public: |
1082 GpuControlListEntryDualGPUTest() { } | 1082 GpuControlListEntryDualGPUTest() { } |
1083 virtual ~GpuControlListEntryDualGPUTest() { } | 1083 virtual ~GpuControlListEntryDualGPUTest() { } |
1084 | 1084 |
1085 virtual void SetUp() OVERRIDE { | 1085 virtual void SetUp() override { |
1086 // Set up a NVIDIA/Intel dual, with NVIDIA as primary and Intel as | 1086 // Set up a NVIDIA/Intel dual, with NVIDIA as primary and Intel as |
1087 // secondary, and initially Intel is active. | 1087 // secondary, and initially Intel is active. |
1088 gpu_info_.gpu.vendor_id = 0x10de; | 1088 gpu_info_.gpu.vendor_id = 0x10de; |
1089 gpu_info_.gpu.device_id = 0x0640; | 1089 gpu_info_.gpu.device_id = 0x0640; |
1090 gpu_info_.gpu.active = false; | 1090 gpu_info_.gpu.active = false; |
1091 GPUInfo::GPUDevice second_gpu; | 1091 GPUInfo::GPUDevice second_gpu; |
1092 second_gpu.vendor_id = 0x8086; | 1092 second_gpu.vendor_id = 0x8086; |
1093 second_gpu.device_id = 0x0166; | 1093 second_gpu.device_id = 0x0166; |
1094 second_gpu.active = true; | 1094 second_gpu.active = true; |
1095 gpu_info_.secondary_gpus.push_back(second_gpu); | 1095 gpu_info_.secondary_gpus.push_back(second_gpu); |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 ); | 1282 ); |
1283 // By default, secondary GPU is active. | 1283 // By default, secondary GPU is active. |
1284 EntryShouldNotApply(json); | 1284 EntryShouldNotApply(json); |
1285 | 1285 |
1286 ActivatePrimaryGPU(); | 1286 ActivatePrimaryGPU(); |
1287 EntryShouldApply(json); | 1287 EntryShouldApply(json); |
1288 } | 1288 } |
1289 | 1289 |
1290 } // namespace gpu | 1290 } // namespace gpu |
1291 | 1291 |
OLD | NEW |