OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_EXTENSIONS_BROWSERTEST_UTIL_H_ | |
6 #define CHROME_BROWSER_EXTENSIONS_BROWSERTEST_UTIL_H_ | |
7 | |
8 #include <string> | |
9 | |
10 class Profile; | |
11 | |
12 namespace extensions { | |
13 namespace browsertest_util { | |
14 | |
15 // Waits until |script| calls "window.domAutomationController.send(result)", | |
16 // where |result| is a string, and returns |result|. Fails the test and returns | |
17 // an empty string if |extension_id| isn't installed in |profile| or doesn't | |
18 // have a background page, or if executing the script fails. | |
not at google - send to devlin
2013/09/04 02:15:16
what happens if the test doesn't return a string?
Jeffrey Yasskin
2013/09/04 02:48:44
Yep, and now I've tested that.
| |
19 std::string ExecuteScriptInBackgroundPage(Profile* profile, | |
20 const std::string& extension_id, | |
21 const std::string& script); | |
22 | |
23 } // namespace browsertest_util | |
24 } // namespace extensions | |
25 | |
26 #endif // CHROME_BROWSER_EXTENSIONS_BROWSERTEST_UTIL_H_ | |
OLD | NEW |