Make default apps cache multiprofile friendly
[chromium-blink-merge.git] / chrome / browser / extensions / browsertest_util.h
blobc9ffad38ad6f2ed5f7f1a9cc4a69e4f3b0fc2750
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_
8 #include <string>
10 class Profile;
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_