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

Unified Diff: extensions/renderer/api_bindings_system_unittest.cc

Issue 2657613005: [Extensions Bindings] Add chrome.runtime.lastError support (Closed)
Patch Set: rebase 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
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 9c4fa7bf815dfe4d95a451ceb92a7eb0ad325b87..7521a8d3b31cd8965cd82cd04e384680b2ed0b0b 100644
--- a/extensions/renderer/api_bindings_system_unittest.cc
+++ b/extensions/renderer/api_bindings_system_unittest.cc
@@ -108,7 +108,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 {
@@ -237,7 +238,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,
@@ -259,7 +260,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"));
@@ -391,7 +392,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\"",

Powered by Google App Engine
This is Rietveld 408576698