Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: chrome/browser/extensions/browsertest_util.h

Issue 23874006: Add a function to send scripts from a browsertest to an extension's background page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add browsertest_util.cc to other binaries to fix link errors Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698