OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/version.h" | 7 #include "base/version.h" |
8 #include "chrome/browser/gpu_blacklist.h" | |
9 #include "chrome/common/gpu_info.h" | 8 #include "chrome/common/gpu_info.h" |
| 9 #include "content/browser/gpu_blacklist.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 TEST(GpuBlacklistTest, BlacklistLogic) { | 12 TEST(GpuBlacklistTest, BlacklistLogic) { |
13 GPUInfo gpu_info; | 13 GPUInfo gpu_info; |
14 gpu_info.SetVideoCardInfo(0x10de, // Vendor ID | 14 gpu_info.SetVideoCardInfo(0x10de, // Vendor ID |
15 0x0640); // Device ID | 15 0x0640); // Device ID |
16 gpu_info.SetDriverInfo("NVIDIA", // Driver vendor | 16 gpu_info.SetDriverInfo("NVIDIA", // Driver vendor |
17 "1.6.18"); // Driver Version | 17 "1.6.18"); // Driver Version |
18 gpu_info.SetLevel(GPUInfo::kComplete); | 18 gpu_info.SetLevel(GPUInfo::kComplete); |
19 scoped_ptr<Version> os_version(Version::GetVersionFromString("10.6.4")); | 19 scoped_ptr<Version> os_version(Version::GetVersionFromString("10.6.4")); |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 flags = blacklist.DetermineGpuFeatureFlags( | 167 flags = blacklist.DetermineGpuFeatureFlags( |
168 GpuBlacklist::kOsWin, os_version.get(), gpu_info); | 168 GpuBlacklist::kOsWin, os_version.get(), gpu_info); |
169 EXPECT_EQ(flags.flags(), 0u); | 169 EXPECT_EQ(flags.flags(), 0u); |
170 flags = blacklist.DetermineGpuFeatureFlags( | 170 flags = blacklist.DetermineGpuFeatureFlags( |
171 GpuBlacklist::kOsLinux, os_version.get(), gpu_info); | 171 GpuBlacklist::kOsLinux, os_version.get(), gpu_info); |
172 EXPECT_EQ( | 172 EXPECT_EQ( |
173 flags.flags(), | 173 flags.flags(), |
174 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas)); | 174 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas)); |
175 } | 175 } |
176 | 176 |
OLD | NEW |