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

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

Issue 1503223005: Identify the active GPU using GL strings in multiple GPU situation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/config/gpu_control_list.cc ('k') | gpu/config/gpu_control_list_format.txt » ('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 (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
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
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
OLDNEW
« no previous file with comments | « gpu/config/gpu_control_list.cc ('k') | gpu/config/gpu_control_list_format.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698