Index: chrome/browser/extensions/extension_browsertest_util.h |
diff --git a/chrome/browser/extensions/extension_browsertest_util.h b/chrome/browser/extensions/extension_browsertest_util.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ed81762825aeb51a835f40d3f094fb3509a1c24a |
--- /dev/null |
+++ b/chrome/browser/extensions/extension_browsertest_util.h |
@@ -0,0 +1,24 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_UTIL_H_ |
+#define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_UTIL_H_ |
not at google - send to devlin
2013/09/03 23:13:38
just browsertest_util?
Jeffrey Yasskin
2013/09/03 23:33:13
Sure, done.
|
+ |
+#include <string> |
+ |
+class Profile; |
+ |
+namespace extensions { |
+ |
not at google - send to devlin
2013/09/03 23:13:38
can we put this file in a browsertest_util namespa
Jeffrey Yasskin
2013/09/03 23:33:13
After some discussion about a 'testing' namespace
|
+// Waits until |script| calls "window.domAutomationController.send('string')" |
not at google - send to devlin
2013/09/03 23:13:38
what is 'string'?
Jeffrey Yasskin
2013/09/03 23:33:13
How's the new comment?
|
+// and returns the string. Fails the test and returns an empty string if |
+// |extension_id| isn't installed in |profile| or doesn't have a background |
+// page, or if executing the script fails. |
+std::string ExecuteScriptInBackgroundPage(Profile* profile, |
+ const std::string& extension_id, |
+ const std::string& script); |
+ |
+} // namespace extensions |
+ |
+#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_UTIL_H_ |