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

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

Issue 2642923002: Add pixel shader version to GPU control list (Closed)
Patch Set: rebase Created 3 years, 10 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
« 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "gpu/config/gpu_control_list.h" 10 #include "gpu/config/gpu_control_list.h"
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 gpu_info.gpu.vendor_id = 0x8086; 1352 gpu_info.gpu.vendor_id = 0x8086;
1353 1353
1354 EXPECT_TRUE(entry->Contains(GpuControlList::kOsLinux, 1354 EXPECT_TRUE(entry->Contains(GpuControlList::kOsLinux,
1355 "3.13.0-63-generic", 1355 "3.13.0-63-generic",
1356 gpu_info)); 1356 gpu_info));
1357 EXPECT_FALSE(entry->Contains(GpuControlList::kOsLinux, 1357 EXPECT_FALSE(entry->Contains(GpuControlList::kOsLinux,
1358 "3.19.2-1-generic", 1358 "3.19.2-1-generic",
1359 gpu_info)); 1359 gpu_info));
1360 } 1360 }
1361 1361
1362 TEST_F(GpuControlListEntryTest, PixelShaderVersion) {
1363 const std::string json = LONG_STRING_CONST(
1364 {"id" : 1, "pixel_shader_version" : {"op" : "<", "value" : "4.1"}});
1365 ScopedEntry entry(GetEntryFromString(json));
1366 EXPECT_TRUE(entry.get() != NULL);
1367 EXPECT_EQ(GpuControlList::kOsAny, entry->GetOsType());
1368
1369 GPUInfo gpu_info;
1370 gpu_info.pixel_shader_version = "3.2";
1371 EXPECT_TRUE(entry->Contains(GpuControlList::kOsMacosx, "10.9", gpu_info));
1372 gpu_info.pixel_shader_version = "4.9";
1373 EXPECT_FALSE(entry->Contains(GpuControlList::kOsMacosx, "10.9", gpu_info));
1374 }
1375
1362 } // namespace gpu 1376 } // namespace gpu
1363 1377
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