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

Unified Diff: extensions/browser/api_test_utils.h

Issue 461273003: Rework ExtensionApiUnittest to run in extensions_unittests, removing its Chrome dependencies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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.h
diff --git a/extensions/browser/api_test_utils.h b/extensions/browser/api_test_utils.h
index 19af3525bbcc70e808954138bacd54f06794ee80..2331eec58ce27476742220212bc6c8faa0912775 100644
--- a/extensions/browser/api_test_utils.h
+++ b/extensions/browser/api_test_utils.h
@@ -55,6 +55,17 @@ base::Value* RunFunctionAndReturnSingleResult(
content::BrowserContext* context,
RunFunctionFlags flags);
+// Run |function| with |args| and return the resulting error. Adds an error to
+// the current test if |function| returns a result. Takes ownership of
+// |function|.
+std::string RunFunctionAndReturnError(UIThreadExtensionFunction* function,
+ const std::string& args,
+ content::BrowserContext* context,
+ RunFunctionFlags flags);
+std::string RunFunctionAndReturnError(UIThreadExtensionFunction* function,
+ const std::string& args,
+ content::BrowserContext* context);
+
// Create and run |function| with |args|. Works with both synchronous and async
// functions. Ownership of |function| remains with the caller.
//

Powered by Google App Engine
This is Rietveld 408576698