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/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 called = true; | 58 called = true; |
59 #endif | 59 #endif |
60 | 60 |
61 static const std::string json_blacklist = | 61 static const std::string json_blacklist = |
62 "{\n" | 62 "{\n" |
63 " \"name\": \"gpu blacklist\",\n" | 63 " \"name\": \"gpu blacklist\",\n" |
64 " \"version\": \"1.0\",\n" | 64 " \"version\": \"1.0\",\n" |
65 " \"entries\": [\n" | 65 " \"entries\": [\n" |
66 " {\n" | 66 " {\n" |
67 " \"id\": 1,\n" | 67 " \"id\": 1,\n" |
68 " \"features\": [\"" + JoinString(features, "\", \"") + "\"]\n" | 68 " \"features\": [\"" + base::JoinString(features, "\", \"") + "\"]\n" |
69 " }\n" | 69 " }\n" |
70 " ]\n" | 70 " ]\n" |
71 "}"; | 71 "}"; |
72 gpu::GPUInfo gpu_info; | 72 gpu::GPUInfo gpu_info; |
73 content::GpuDataManager::GetInstance()->InitializeForTesting( | 73 content::GpuDataManager::GetInstance()->InitializeForTesting( |
74 json_blacklist, gpu_info); | 74 json_blacklist, gpu_info); |
75 } | 75 } |
76 | 76 |
77 protected: | 77 protected: |
78 scoped_ptr<RequirementsChecker> checker_; | 78 scoped_ptr<RequirementsChecker> checker_; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 IDS_EXTENSION_WEBGL_NOT_SUPPORTED)); | 156 IDS_EXTENSION_WEBGL_NOT_SUPPORTED)); |
157 } | 157 } |
158 | 158 |
159 checker_->Check(extension, base::Bind( | 159 checker_->Check(extension, base::Bind( |
160 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, | 160 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, |
161 base::Unretained(this), expected_errors)); | 161 base::Unretained(this), expected_errors)); |
162 content::RunAllBlockingPoolTasksUntilIdle(); | 162 content::RunAllBlockingPoolTasksUntilIdle(); |
163 } | 163 } |
164 | 164 |
165 } // namespace extensions | 165 } // namespace extensions |
OLD | NEW |