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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_EXTENSIONS_BROWSERTEST_UTIL_H_
6 #define CHROME_BROWSER_EXTENSIONS_BROWSERTEST_UTIL_H_
12 namespace extensions
{
13 namespace browsertest_util
{
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.
19 std::string
ExecuteScriptInBackgroundPage(Profile
* profile
,
20 const std::string
& extension_id
,
21 const std::string
& script
);
23 } // namespace browsertest_util
24 } // namespace extensions
26 #endif // CHROME_BROWSER_EXTENSIONS_BROWSERTEST_UTIL_H_