summaryrefslogtreecommitdiffstats
path: root/extensions/browser/api_test_utils.cc
diff options
context:
space:
mode:
authorjamescook <jamescook@chromium.org>2014-09-09 08:59:21 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-09 16:08:08 +0000
commit30a1ccd6ccf055b61ae86d29657f16513254b773 (patch)
treed42a261b0dfc24fefd1485031009ce07f6085c93 /extensions/browser/api_test_utils.cc
parent46eac8f5a557862d2c39a01986d2a3b8aaf9c866 (diff)
downloadchromium_src-30a1ccd6ccf055b61ae86d29657f16513254b773.zip
chromium_src-30a1ccd6ccf055b61ae86d29657f16513254b773.tar.gz
chromium_src-30a1ccd6ccf055b61ae86d29657f16513254b773.tar.bz2
Move extensions power API unit test to extensions_unittests
It was running in Chrome's unit_tests suite for historical reasons. BUG=397164 TEST=extensions_unittests Review URL: https://codereview.chromium.org/554963002 Cr-Commit-Position: refs/heads/master@{#293946}
Diffstat (limited to 'extensions/browser/api_test_utils.cc')
-rw-r--r--extensions/browser/api_test_utils.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/extensions/browser/api_test_utils.cc b/extensions/browser/api_test_utils.cc
index dd04bb7..b96f4a6 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) {