| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 } | 52 } |
| 53 | 53 |
| 54 void TearDown() { | 54 void TearDown() { |
| 55 } | 55 } |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 GPUInfo gpu_info_; | 58 GPUInfo gpu_info_; |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 TEST_F(GpuBlacklistTest, CurrentBlacklistValidation) { | 61 TEST_F(GpuBlacklistTest, CurrentBlacklistValidation) { |
| 62 FilePath data_file; | 62 base::FilePath data_file; |
| 63 ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &data_file)); | 63 ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &data_file)); |
| 64 data_file = | 64 data_file = |
| 65 data_file.Append(FILE_PATH_LITERAL("content")) | 65 data_file.Append(FILE_PATH_LITERAL("content")) |
| 66 .Append(FILE_PATH_LITERAL("browser")) | 66 .Append(FILE_PATH_LITERAL("browser")) |
| 67 .Append(FILE_PATH_LITERAL("gpu")) | 67 .Append(FILE_PATH_LITERAL("gpu")) |
| 68 .Append(FILE_PATH_LITERAL("software_rendering_list.json")); | 68 .Append(FILE_PATH_LITERAL("software_rendering_list.json")); |
| 69 ASSERT_TRUE(file_util::PathExists(data_file)); | 69 ASSERT_TRUE(file_util::PathExists(data_file)); |
| 70 int64 data_file_size64 = 0; | 70 int64 data_file_size64 = 0; |
| 71 ASSERT_TRUE(file_util::GetFileSize(data_file, &data_file_size64)); | 71 ASSERT_TRUE(file_util::GetFileSize(data_file, &data_file_size64)); |
| 72 int data_file_size = static_cast<int>(data_file_size64); | 72 int data_file_size = static_cast<int>(data_file_size64); |
| (...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1513 | 1513 |
| 1514 scoped_ptr<GpuBlacklist> blacklist(Create()); | 1514 scoped_ptr<GpuBlacklist> blacklist(Create()); |
| 1515 EXPECT_TRUE(blacklist->LoadGpuBlacklist(json, GpuBlacklist::kAllOs)); | 1515 EXPECT_TRUE(blacklist->LoadGpuBlacklist(json, GpuBlacklist::kAllOs)); |
| 1516 GpuFeatureType type = blacklist->MakeBlacklistDecision( | 1516 GpuFeatureType type = blacklist->MakeBlacklistDecision( |
| 1517 GpuBlacklist::kOsLinux, kOsVersion, gpu_info).blacklisted_features; | 1517 GpuBlacklist::kOsLinux, kOsVersion, gpu_info).blacklisted_features; |
| 1518 EXPECT_EQ(GPU_FEATURE_TYPE_WEBGL, type); | 1518 EXPECT_EQ(GPU_FEATURE_TYPE_WEBGL, type); |
| 1519 EXPECT_FALSE(blacklist->needs_more_info()); | 1519 EXPECT_FALSE(blacklist->needs_more_info()); |
| 1520 } | 1520 } |
| 1521 | 1521 |
| 1522 } // namespace content | 1522 } // namespace content |
| OLD | NEW |