| 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 <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 Loading... |
| 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 |
| OLD | NEW |