| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSERTEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_BROWSERTEST_UTIL_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_BROWSERTEST_UTIL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_BROWSERTEST_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 class Profile; | 10 class Profile; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 const std::string& script); | 21 const std::string& script); |
| 22 | 22 |
| 23 // Same as ExecuteScriptInBackgroundPage, but doesn't wait for the script | 23 // Same as ExecuteScriptInBackgroundPage, but doesn't wait for the script |
| 24 // to return a result. Fails the test and returns false if |extension_id| | 24 // to return a result. Fails the test and returns false if |extension_id| |
| 25 // isn't installed in |profile| or doesn't have a background page, or if | 25 // isn't installed in |profile| or doesn't have a background page, or if |
| 26 // executing the script fails. | 26 // executing the script fails. |
| 27 bool ExecuteScriptInBackgroundPageNoWait(Profile* profile, | 27 bool ExecuteScriptInBackgroundPageNoWait(Profile* profile, |
| 28 const std::string& extension_id, | 28 const std::string& extension_id, |
| 29 const std::string& script); | 29 const std::string& script); |
| 30 | 30 |
| 31 // On chromeos, the extension cache directory must be initialized before |
| 32 // extensions can be installed in some situations (e.g. policy force installs |
| 33 // via update urls). The chromeos device setup scripts take care of this in |
| 34 // actual production devices, but some tests need to do it manually. |
| 35 void CreateAndInitializeLocalCache(); |
| 36 |
| 31 } // namespace browsertest_util | 37 } // namespace browsertest_util |
| 32 } // namespace extensions | 38 } // namespace extensions |
| 33 | 39 |
| 34 #endif // CHROME_BROWSER_EXTENSIONS_BROWSERTEST_UTIL_H_ | 40 #endif // CHROME_BROWSER_EXTENSIONS_BROWSERTEST_UTIL_H_ |
| OLD | NEW |