Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 EXPECT_EQ(flags.flags(), | 182 EXPECT_EQ(flags.flags(), |
| 183 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureWebgl)); | 183 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureWebgl)); |
| 184 flags = blacklist.DetermineGpuFeatureFlags( | 184 flags = blacklist.DetermineGpuFeatureFlags( |
| 185 GpuBlacklist::kOsWin, os_version.get(), gpu_info()); | 185 GpuBlacklist::kOsWin, os_version.get(), gpu_info()); |
| 186 EXPECT_EQ(flags.flags(), | 186 EXPECT_EQ(flags.flags(), |
| 187 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureWebgl)); | 187 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureWebgl)); |
| 188 flags = blacklist.DetermineGpuFeatureFlags( | 188 flags = blacklist.DetermineGpuFeatureFlags( |
| 189 GpuBlacklist::kOsLinux, os_version.get(), gpu_info()); | 189 GpuBlacklist::kOsLinux, os_version.get(), gpu_info()); |
| 190 EXPECT_EQ(flags.flags(), | 190 EXPECT_EQ(flags.flags(), |
| 191 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureWebgl)); | 191 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureWebgl)); |
| 192 #if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) | 192 #if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_OPE NBSD) |
|
Mark Mentovai
2011/10/26 23:24:28
Watch the 80-character limitation. Use a \ if you
Robert Nagy
2011/10/31 15:38:38
Done.
| |
| 193 // Blacklist entries will be filtered to the current OS only upon loading. | 193 // Blacklist entries will be filtered to the current OS only upon loading. |
| 194 EXPECT_TRUE( | 194 EXPECT_TRUE( |
| 195 blacklist.LoadGpuBlacklist(vendor_json, GpuBlacklist::kCurrentOsOnly)); | 195 blacklist.LoadGpuBlacklist(vendor_json, GpuBlacklist::kCurrentOsOnly)); |
| 196 flags = blacklist.DetermineGpuFeatureFlags( | 196 flags = blacklist.DetermineGpuFeatureFlags( |
| 197 GpuBlacklist::kOsMacosx, os_version.get(), gpu_info()); | 197 GpuBlacklist::kOsMacosx, os_version.get(), gpu_info()); |
| 198 EXPECT_EQ(flags.flags(), | 198 EXPECT_EQ(flags.flags(), |
| 199 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureWebgl)); | 199 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureWebgl)); |
| 200 flags = blacklist.DetermineGpuFeatureFlags( | 200 flags = blacklist.DetermineGpuFeatureFlags( |
| 201 GpuBlacklist::kOsWin, os_version.get(), gpu_info()); | 201 GpuBlacklist::kOsWin, os_version.get(), gpu_info()); |
| 202 EXPECT_EQ(flags.flags(), | 202 EXPECT_EQ(flags.flags(), |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 753 bool disabled = false; | 753 bool disabled = false; |
| 754 blacklist.GetGpuFeatureFlagEntries( | 754 blacklist.GetGpuFeatureFlagEntries( |
| 755 GpuFeatureFlags::kGpuFeatureAll, flag_entries, disabled); | 755 GpuFeatureFlags::kGpuFeatureAll, flag_entries, disabled); |
| 756 EXPECT_EQ(flag_entries.size(), 0u); | 756 EXPECT_EQ(flag_entries.size(), 0u); |
| 757 disabled = true; | 757 disabled = true; |
| 758 blacklist.GetGpuFeatureFlagEntries( | 758 blacklist.GetGpuFeatureFlagEntries( |
| 759 GpuFeatureFlags::kGpuFeatureAll, flag_entries, disabled); | 759 GpuFeatureFlags::kGpuFeatureAll, flag_entries, disabled); |
| 760 EXPECT_EQ(flag_entries.size(), 1u); | 760 EXPECT_EQ(flag_entries.size(), 1u); |
| 761 } | 761 } |
| 762 | 762 |
| OLD | NEW |