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" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
13 #include "chrome/browser/extensions/extension_browsertest.h" | 13 #include "chrome/browser/extensions/extension_browsertest.h" |
14 #include "chrome/browser/extensions/requirements_checker.h" | 14 #include "chrome/browser/extensions/requirements_checker.h" |
15 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
| 16 #include "chrome/grit/generated_resources.h" |
16 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
17 #include "content/public/browser/gpu_data_manager.h" | 18 #include "content/public/browser/gpu_data_manager.h" |
18 #include "extensions/common/extension.h" | 19 #include "extensions/common/extension.h" |
19 #include "extensions/common/file_util.h" | 20 #include "extensions/common/file_util.h" |
20 #include "gpu/config/gpu_info.h" | 21 #include "gpu/config/gpu_info.h" |
21 #include "grit/generated_resources.h" | |
22 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
23 | 23 |
24 namespace extensions { | 24 namespace extensions { |
25 | 25 |
26 class RequirementsCheckerBrowserTest : public ExtensionBrowserTest { | 26 class RequirementsCheckerBrowserTest : public ExtensionBrowserTest { |
27 public: | 27 public: |
28 scoped_refptr<const Extension> LoadExtensionFromDirName( | 28 scoped_refptr<const Extension> LoadExtensionFromDirName( |
29 const std::string& extension_dir_name) { | 29 const std::string& extension_dir_name) { |
30 base::FilePath extension_path; | 30 base::FilePath extension_path; |
31 std::string load_error; | 31 std::string load_error; |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 IDS_EXTENSION_WEBGL_NOT_SUPPORTED)); | 153 IDS_EXTENSION_WEBGL_NOT_SUPPORTED)); |
154 } | 154 } |
155 | 155 |
156 checker_.Check(extension, base::Bind( | 156 checker_.Check(extension, base::Bind( |
157 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, | 157 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, |
158 base::Unretained(this), expected_errors)); | 158 base::Unretained(this), expected_errors)); |
159 content::BrowserThread::GetBlockingPool()->FlushForTesting(); | 159 content::BrowserThread::GetBlockingPool()->FlushForTesting(); |
160 } | 160 } |
161 | 161 |
162 } // namespace extensions | 162 } // namespace extensions |
OLD | NEW |