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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 // navigation. | 223 // navigation. |
224 void NavigateInRenderer(content::WebContents* contents, const GURL& url); | 224 void NavigateInRenderer(content::WebContents* contents, const GURL& url); |
225 | 225 |
226 // Looks for an ExtensionHost whose URL has the given path component | 226 // Looks for an ExtensionHost whose URL has the given path component |
227 // (including leading slash). Also verifies that the expected number of hosts | 227 // (including leading slash). Also verifies that the expected number of hosts |
228 // are loaded. | 228 // are loaded. |
229 extensions::ExtensionHost* FindHostWithPath(ExtensionProcessManager* manager, | 229 extensions::ExtensionHost* FindHostWithPath(ExtensionProcessManager* manager, |
230 const std::string& path, | 230 const std::string& path, |
231 int expected_hosts); | 231 int expected_hosts); |
232 | 232 |
| 233 // Returns |
| 234 // extensions::browsertest_util::ExecuteScriptInBackgroundPage(profile(), |
| 235 // extension_id, script). |
| 236 std::string ExecuteScriptInBackgroundPage(const std::string& extension_id, |
| 237 const std::string& script); |
| 238 |
233 // content::NotificationObserver | 239 // content::NotificationObserver |
234 virtual void Observe(int type, | 240 virtual void Observe(int type, |
235 const content::NotificationSource& source, | 241 const content::NotificationSource& source, |
236 const content::NotificationDetails& details) OVERRIDE; | 242 const content::NotificationDetails& details) OVERRIDE; |
237 | 243 |
238 bool loaded_; | 244 bool loaded_; |
239 bool installed_; | 245 bool installed_; |
240 | 246 |
241 // test_data/extensions. | 247 // test_data/extensions. |
242 base::FilePath test_data_dir_; | 248 base::FilePath test_data_dir_; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 | 307 |
302 // Disable external install UI. | 308 // Disable external install UI. |
303 extensions::FeatureSwitch::ScopedOverride | 309 extensions::FeatureSwitch::ScopedOverride |
304 override_prompt_for_external_extensions_; | 310 override_prompt_for_external_extensions_; |
305 | 311 |
306 // The default profile to be used. | 312 // The default profile to be used. |
307 Profile* profile_; | 313 Profile* profile_; |
308 }; | 314 }; |
309 | 315 |
310 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ | 316 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ |
OLD | NEW |