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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // will result in stale information in the GPUDataManager which will throw off | 63 // will result in stale information in the GPUDataManager which will throw off |
64 // the RequirementsChecker. | 64 // the RequirementsChecker. |
65 void BlackListGPUFeatures(const std::vector<std::string>& features) { | 65 void BlackListGPUFeatures(const std::vector<std::string>& features) { |
66 static const std::string json_blacklist = | 66 static const std::string json_blacklist = |
67 "{\n" | 67 "{\n" |
68 " \"name\": \"gpu blacklist\",\n" | 68 " \"name\": \"gpu blacklist\",\n" |
69 " \"version\": \"1.0\",\n" | 69 " \"version\": \"1.0\",\n" |
70 " \"entries\": [\n" | 70 " \"entries\": [\n" |
71 " {\n" | 71 " {\n" |
72 " \"id\": 1,\n" | 72 " \"id\": 1,\n" |
73 " \"blacklist\": [\"" + JoinString(features, "\", \"") + "\"]\n" | 73 " \"features\": [\"" + JoinString(features, "\", \"") + "\"]\n" |
74 " }\n" | 74 " }\n" |
75 " ]\n" | 75 " ]\n" |
76 "}"; | 76 "}"; |
77 content::GPUInfo gpu_info; | 77 content::GPUInfo gpu_info; |
78 content::GpuDataManager::GetInstance()->InitializeForTesting( | 78 content::GpuDataManager::GetInstance()->InitializeForTesting( |
79 json_blacklist, gpu_info); | 79 json_blacklist, gpu_info); |
80 } | 80 } |
81 | 81 |
82 protected: | 82 protected: |
83 std::vector<std::string> requirement_errors_; | 83 std::vector<std::string> requirement_errors_; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 LoadExtensionFromDirName("require_3d")); | 184 LoadExtensionFromDirName("require_3d")); |
185 ASSERT_TRUE(extension.get()); | 185 ASSERT_TRUE(extension.get()); |
186 | 186 |
187 checker_.Check(extension, base::Bind( | 187 checker_.Check(extension, base::Bind( |
188 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, | 188 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, |
189 base::Unretained(this), std::vector<std::string>())); | 189 base::Unretained(this), std::vector<std::string>())); |
190 content::BrowserThread::GetBlockingPool()->FlushForTesting(); | 190 content::BrowserThread::GetBlockingPool()->FlushForTesting(); |
191 } | 191 } |
192 | 192 |
193 } // extensions | 193 } // extensions |
OLD | NEW |