| 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" |
| 11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 12 #include "base/version.h" | 12 #include "base/version.h" |
| 13 #include "content/browser/gpu_blacklist.h" | 13 #include "content/browser/gpu_blacklist.h" |
| 14 #include "content/common/gpu_info.h" | 14 #include "content/common/gpu/gpu_info.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 class GpuBlacklistTest : public testing::Test { | 17 class GpuBlacklistTest : public testing::Test { |
| 18 public: | 18 public: |
| 19 GpuBlacklistTest() { } | 19 GpuBlacklistTest() { } |
| 20 | 20 |
| 21 virtual ~GpuBlacklistTest() { } | 21 virtual ~GpuBlacklistTest() { } |
| 22 | 22 |
| 23 const GPUInfo& gpu_info() const { | 23 const GPUInfo& gpu_info() const { |
| 24 return gpu_info_; | 24 return gpu_info_; |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 EXPECT_TRUE(blacklist.LoadGpuBlacklist(devices_json, false)); | 411 EXPECT_TRUE(blacklist.LoadGpuBlacklist(devices_json, false)); |
| 412 GpuFeatureFlags flags = blacklist.DetermineGpuFeatureFlags( | 412 GpuFeatureFlags flags = blacklist.DetermineGpuFeatureFlags( |
| 413 GpuBlacklist::kOsChromeOS, os_version.get(), gpu_info()); | 413 GpuBlacklist::kOsChromeOS, os_version.get(), gpu_info()); |
| 414 EXPECT_EQ(flags.flags(), | 414 EXPECT_EQ(flags.flags(), |
| 415 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureWebgl)); | 415 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureWebgl)); |
| 416 flags = blacklist.DetermineGpuFeatureFlags( | 416 flags = blacklist.DetermineGpuFeatureFlags( |
| 417 GpuBlacklist::kOsLinux, os_version.get(), gpu_info()); | 417 GpuBlacklist::kOsLinux, os_version.get(), gpu_info()); |
| 418 EXPECT_EQ(flags.flags(), 0u); | 418 EXPECT_EQ(flags.flags(), 0u); |
| 419 } | 419 } |
| 420 | 420 |
| OLD | NEW |