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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 "os": { | 1141 "os": { |
1142 "type": "macosx" | 1142 "type": "macosx" |
1143 }, | 1143 }, |
1144 "vendor_id": "0x8086", | 1144 "vendor_id": "0x8086", |
1145 "device_id": ["0x0166"], | 1145 "device_id": ["0x0166"], |
1146 "features": [ | 1146 "features": [ |
1147 "test_feature_0" | 1147 "test_feature_0" |
1148 ] | 1148 ] |
1149 } | 1149 } |
1150 ); | 1150 ); |
1151 // Default is primary. | 1151 // Default is active, and the secondary Intel GPU is active. |
1152 EntryShouldNotApply(json_default); | 1152 EntryShouldApply(json_default); |
1153 } | 1153 } |
1154 | 1154 |
1155 TEST_F(GpuControlListEntryDualGPUTest, ActiveSecondaryGPU) { | 1155 TEST_F(GpuControlListEntryDualGPUTest, ActiveSecondaryGPU) { |
1156 const std::string json = LONG_STRING_CONST( | 1156 const std::string json = LONG_STRING_CONST( |
1157 { | 1157 { |
1158 "id": 1, | 1158 "id": 1, |
1159 "os": { | 1159 "os": { |
1160 "type": "macosx" | 1160 "type": "macosx" |
1161 }, | 1161 }, |
1162 "vendor_id": "0x8086", | 1162 "vendor_id": "0x8086", |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1265 EXPECT_TRUE(entry->Contains(GpuControlList::kOsLinux, | 1265 EXPECT_TRUE(entry->Contains(GpuControlList::kOsLinux, |
1266 "3.13.0-63-generic", | 1266 "3.13.0-63-generic", |
1267 gpu_info)); | 1267 gpu_info)); |
1268 EXPECT_FALSE(entry->Contains(GpuControlList::kOsLinux, | 1268 EXPECT_FALSE(entry->Contains(GpuControlList::kOsLinux, |
1269 "3.19.2-1-generic", | 1269 "3.19.2-1-generic", |
1270 gpu_info)); | 1270 gpu_info)); |
1271 } | 1271 } |
1272 | 1272 |
1273 } // namespace gpu | 1273 } // namespace gpu |
1274 | 1274 |
OLD | NEW |