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

Side by Side Diff: chrome/browser/gpu_blacklist_unittest.cc

Issue 6364013: Defered collect DirectX diagnostics until they are needed for about:gpu.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/gpu_blacklist.cc ('k') | chrome/browser/gpu_process_host_ui_shim.h » ('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) 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" 8 #include "chrome/browser/gpu_blacklist.h"
9 #include "chrome/common/gpu_info.h" 9 #include "chrome/common/gpu_info.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.SetProgress(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"));
20 20
21 GpuBlacklist blacklist; 21 GpuBlacklist blacklist;
22 22
23 // Default blacklist settings: all feature are allowed. 23 // Default blacklist settings: all feature are allowed.
24 GpuFeatureFlags flags = blacklist.DetermineGpuFeatureFlags( 24 GpuFeatureFlags flags = blacklist.DetermineGpuFeatureFlags(
25 GpuBlacklist::kOsMacosx, os_version.get(), gpu_info); 25 GpuBlacklist::kOsMacosx, os_version.get(), gpu_info);
26 EXPECT_EQ(flags.flags(), 0u); 26 EXPECT_EQ(flags.flags(), 0u);
27 27
28 // Empty list: all features are allowed. 28 // Empty list: all features are allowed.
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 flags = blacklist.DetermineGpuFeatureFlags( 149 flags = blacklist.DetermineGpuFeatureFlags(
150 GpuBlacklist::kOsWin, os_version.get(), gpu_info); 150 GpuBlacklist::kOsWin, os_version.get(), gpu_info);
151 EXPECT_EQ(flags.flags(), 0u); 151 EXPECT_EQ(flags.flags(), 0u);
152 flags = blacklist.DetermineGpuFeatureFlags( 152 flags = blacklist.DetermineGpuFeatureFlags(
153 GpuBlacklist::kOsLinux, os_version.get(), gpu_info); 153 GpuBlacklist::kOsLinux, os_version.get(), gpu_info);
154 EXPECT_EQ( 154 EXPECT_EQ(
155 flags.flags(), 155 flags.flags(),
156 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas)); 156 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas));
157 } 157 }
158 158
OLDNEW
« no previous file with comments | « chrome/browser/gpu_blacklist.cc ('k') | chrome/browser/gpu_process_host_ui_shim.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698