| Index: gpu/config/gpu_control_list_entry_unittest.cc
|
| diff --git a/gpu/config/gpu_control_list_entry_unittest.cc b/gpu/config/gpu_control_list_entry_unittest.cc
|
| index b62be3e6606b9bbe3d1475f6216b5b7d5f731d69..d9ab702135dd3e7bf57581d2e806318ca49f35a7 100644
|
| --- a/gpu/config/gpu_control_list_entry_unittest.cc
|
| +++ b/gpu/config/gpu_control_list_entry_unittest.cc
|
| @@ -56,7 +56,6 @@ class GpuControlListEntryTest : public testing::Test {
|
| gpu_info_.driver_vendor = "NVIDIA";
|
| gpu_info_.driver_version = "1.6.18";
|
| gpu_info_.driver_date = "7-14-2009";
|
| - gpu_info_.machine_model = "MacBookPro 7.1";
|
| gpu_info_.gl_vendor = "NVIDIA Corporation";
|
| gpu_info_.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine";
|
| gpu_info_.performance_stats.graphics = 5.0;
|
| @@ -707,6 +706,66 @@ TEST_F(GpuControlListEntryTest, SingleActiveGPU) {
|
| GpuControlList::kOsMacosx, "10.6", gpu_info()));
|
| }
|
|
|
| +#if defined(OS_MACOSX)
|
| +TEST_F(GpuControlListEntryTest, MachineModelMac) {
|
| + const std::string json = LONG_STRING_CONST(
|
| + {
|
| + "id": 1,
|
| + "os": {
|
| + "type": "macosx"
|
| + },
|
| + "machine_model": {
|
| + "name": {
|
| + "op": "=",
|
| + "value": "MacBookPro"
|
| + },
|
| + "version": {
|
| + "op": "=",
|
| + "value": "7.1"
|
| + }
|
| + },
|
| + "features": [
|
| + "test_feature_0"
|
| + ]
|
| + }
|
| + );
|
| + ScopedEntry entry(GetEntryFromString(json));
|
| + EXPECT_TRUE(entry.get() != NULL);
|
| + GPUInfo gpu_info;
|
| + gpu_info_.machine_model = "MacBookPro 7.1";
|
| + EXPECT_EQ(GpuControlList::kOsMacosx, entry->GetOsType());
|
| + EXPECT_TRUE(entry->Contains(
|
| + GpuControlList::kOsMacosx, "10.6", gpu_info));
|
| +}
|
| +#else
|
| +TEST_F(GpuControlListEntryTest, MachineModelNonMac) {
|
| + const std::string json = LONG_STRING_CONST(
|
| + {
|
| + "id": 1,
|
| + "os": {
|
| + "type": "android"
|
| + },
|
| + "machine_model": {
|
| + "name": {
|
| + "op": "=",
|
| + "value": "Nexus 5"
|
| + }
|
| + },
|
| + "features": [
|
| + "test_feature_0"
|
| + ]
|
| + }
|
| + );
|
| + ScopedEntry entry(GetEntryFromString(json));
|
| + EXPECT_TRUE(entry.get() != NULL);
|
| + EXPECT_EQ(GpuControlList::kOsAndroid, entry->GetOsType());
|
| + GPUInfo gpu_info;
|
| + gpu_info.machine_model = "Nexus 5";
|
| + EXPECT_TRUE(entry->Contains(
|
| + GpuControlList::kOsAndroid, "4.1", gpu_info));
|
| +}
|
| +#endif
|
| +
|
| class GpuControlListEntryDualGPUTest : public GpuControlListEntryTest {
|
| public:
|
| GpuControlListEntryDualGPUTest() { }
|
|
|