| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "gpu/config/gpu_control_list.h" | 8 #include "gpu/config/gpu_control_list.h" |
| 9 #include "gpu/config/gpu_info.h" | 9 #include "gpu/config/gpu_info.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 void SetUp() override { | 50 void SetUp() override { |
| 51 gpu_info_.gpu.vendor_id = kNvidiaVendorId; | 51 gpu_info_.gpu.vendor_id = kNvidiaVendorId; |
| 52 gpu_info_.gpu.device_id = 0x0640; | 52 gpu_info_.gpu.device_id = 0x0640; |
| 53 gpu_info_.driver_vendor = "NVIDIA"; | 53 gpu_info_.driver_vendor = "NVIDIA"; |
| 54 gpu_info_.driver_version = "1.6.18"; | 54 gpu_info_.driver_version = "1.6.18"; |
| 55 gpu_info_.driver_date = "7-14-2009"; | 55 gpu_info_.driver_date = "7-14-2009"; |
| 56 gpu_info_.machine_model_name = "MacBookPro"; | 56 gpu_info_.machine_model_name = "MacBookPro"; |
| 57 gpu_info_.machine_model_version = "7.1"; | 57 gpu_info_.machine_model_version = "7.1"; |
| 58 gpu_info_.gl_vendor = "NVIDIA Corporation"; | 58 gpu_info_.gl_vendor = "NVIDIA Corporation"; |
| 59 gpu_info_.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine"; | 59 gpu_info_.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine"; |
| 60 gpu_info_.performance_stats.graphics = 5.0; | |
| 61 gpu_info_.performance_stats.gaming = 5.0; | |
| 62 gpu_info_.performance_stats.overall = 5.0; | |
| 63 } | 60 } |
| 64 | 61 |
| 65 void TearDown() override {} | 62 void TearDown() override {} |
| 66 | 63 |
| 67 private: | 64 private: |
| 68 GPUInfo gpu_info_; | 65 GPUInfo gpu_info_; |
| 69 }; | 66 }; |
| 70 | 67 |
| 71 TEST_F(GpuControlListTest, DefaultControlListSettings) { | 68 TEST_F(GpuControlListTest, DefaultControlListSettings) { |
| 72 scoped_ptr<GpuControlList> control_list(Create()); | 69 scoped_ptr<GpuControlList> control_list(Create()); |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 // For non AMD switchable | 576 // For non AMD switchable |
| 580 gpu_info.amd_switchable = false; | 577 gpu_info.amd_switchable = false; |
| 581 features = control_list->MakeDecision( | 578 features = control_list->MakeDecision( |
| 582 GpuControlList::kOsWin, kOsVersion, gpu_info); | 579 GpuControlList::kOsWin, kOsVersion, gpu_info); |
| 583 EXPECT_EMPTY_SET(features); | 580 EXPECT_EMPTY_SET(features); |
| 584 } | 581 } |
| 585 } | 582 } |
| 586 | 583 |
| 587 } // namespace gpu | 584 } // namespace gpu |
| 588 | 585 |
| OLD | NEW |