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

Unified Diff: chrome/browser/extensions/extension_function_test_utils.cc

Issue 8008012: chrome.clear: Increasing granularity of public API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Dropping strings, moving to milliseconds since epoch. Created 9 years 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
« no previous file with comments | « chrome/browser/extensions/extension_function_test_utils.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_function_test_utils.cc
diff --git a/chrome/browser/extensions/extension_function_test_utils.cc b/chrome/browser/extensions/extension_function_test_utils.cc
index 99538077849d50df18d55913a63527c233696be1..71e56d49bead00572276b2f7de652fec7d9e303f 100644
--- a/chrome/browser/extensions/extension_function_test_utils.cc
+++ b/chrome/browser/extensions/extension_function_test_utils.cc
@@ -142,6 +142,24 @@ base::Value* RunFunctionAndReturnResult(UIThreadExtensionFunction* function,
return function->GetResultValue()->DeepCopy();
Aaron Boodman 2011/12/14 22:23:46 Was the only reason RunFunctionWithoutResult neede
Mike West 2011/12/14 22:41:59 Yes, that's what I originally did. Having a separa
Aaron Boodman 2011/12/14 22:44:35 You can just do that assertion at the call site.
Mike West 2011/12/14 22:59:03 Done.
}
+bool RunFunctionWithoutResult(UIThreadExtensionFunction* function,
+ const std::string& args,
+ Browser* browser) {
+ return RunFunctionWithoutResult(function, args, browser, NONE);
+}
+bool RunFunctionWithoutResult(UIThreadExtensionFunction* function,
+ const std::string& args,
+ Browser* browser,
+ RunFunctionFlags flags) {
+ scoped_refptr<ExtensionFunction> function_owner(function);
+ bool success = RunFunction(function, args, browser, flags);
+ EXPECT_TRUE(function->GetError().empty()) << "Unexpected error: "
+ << function->GetError();
+ EXPECT_FALSE(function->GetResultValue()) << "Unexpected result value: "
+ << function->GetResult();
+ return success;
+}
+
// This helps us be able to wait until an AsyncExtensionFunction calls
// SendResponse.
class SendResponseDelegate
« no previous file with comments | « chrome/browser/extensions/extension_function_test_utils.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698