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

Unified Diff: extensions/renderer/api_bindings_system_unittest.cc

Issue 2657613005: [Extensions Bindings] Add chrome.runtime.lastError support (Closed)
Patch Set: . Created 3 years, 10 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
« no previous file with comments | « extensions/renderer/api_bindings_system.cc ('k') | extensions/renderer/api_last_error.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/api_bindings_system_unittest.cc
diff --git a/extensions/renderer/api_bindings_system_unittest.cc b/extensions/renderer/api_bindings_system_unittest.cc
index e5df38db3804ad493b2ff927ef46e20dc31b7206..0b9c4419e42be2becb852fb7c7dfa4ef6ed82721 100644
--- a/extensions/renderer/api_bindings_system_unittest.cc
+++ b/extensions/renderer/api_bindings_system_unittest.cc
@@ -117,7 +117,8 @@ class APIBindingsSystemTestBase : public APIBindingTest {
base::Bind(&APIBindingsSystemTestBase::OnAPIRequest,
base::Unretained(this)),
base::Bind(&APIBindingsSystemTestBase::OnEventListenersChanged,
- base::Unretained(this)));
+ base::Unretained(this)),
+ APILastError(APILastError::GetParent()));
}
void TearDown() override {
@@ -248,7 +249,7 @@ TEST_F(APIBindingsSystemTest, TestInitializationAndCallbacks) {
std::unique_ptr<base::ListValue> expected_args =
ListValueFromString(kResponseArgsJson);
bindings_system()->CompleteRequest(last_request()->request_id,
- *expected_args);
+ *expected_args, std::string());
EXPECT_EQ(ReplaceSingleQuotes(kResponseArgsJson),
GetStringPropertyFromObject(context->Global(), context,
@@ -270,7 +271,7 @@ TEST_F(APIBindingsSystemTest, TestInitializationAndCallbacks) {
"[{'prop1':'alpha','prop2':42}]");
bindings_system()->CompleteRequest(last_request()->request_id,
- base::ListValue());
+ base::ListValue(), std::string());
EXPECT_EQ("[]", GetStringPropertyFromObject(context->Global(), context,
"callbackArguments"));
@@ -402,7 +403,8 @@ TEST_F(APIBindingsSystemTest, TestSetCustomCallback) {
std::unique_ptr<base::ListValue> response =
ListValueFromString("['alpha','beta']");
- bindings_system()->CompleteRequest(last_request()->request_id, *response);
+ bindings_system()->CompleteRequest(last_request()->request_id, *response,
+ std::string());
EXPECT_EQ(
"\"alpha.functionWithCallback\"",
« no previous file with comments | « extensions/renderer/api_bindings_system.cc ('k') | extensions/renderer/api_last_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698