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

Unified Diff: extensions/browser/api_test_utils.cc

Issue 554963002: Move extensions power API unit test to extensions_unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/api_test_utils.cc
diff --git a/extensions/browser/api_test_utils.cc b/extensions/browser/api_test_utils.cc
index dd04bb7948cc6a9007fdcf473fa5abb09b86c14f..b96f4a6c5a95d1c2c73b1a6fe4c39dbd62c5a6cf 100644
--- a/extensions/browser/api_test_utils.cc
+++ b/extensions/browser/api_test_utils.cc
@@ -155,6 +155,15 @@ std::string RunFunctionAndReturnError(UIThreadExtensionFunction* function,
bool RunFunction(UIThreadExtensionFunction* function,
const std::string& args,
+ content::BrowserContext* context) {
+ TestFunctionDispatcherDelegate delegate;
+ scoped_ptr<ExtensionFunctionDispatcher> dispatcher(
+ new ExtensionFunctionDispatcher(context, &delegate));
+ return RunFunction(function, args, context, dispatcher.Pass(), NONE);
+}
+
+bool RunFunction(UIThreadExtensionFunction* function,
+ const std::string& args,
content::BrowserContext* context,
scoped_ptr<extensions::ExtensionFunctionDispatcher> dispatcher,
RunFunctionFlags flags) {

Powered by Google App Engine
This is Rietveld 408576698