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

Unified Diff: components/copresence/rpc/rpc_handler_unittest.cc

Issue 469883002: Using API key specified from js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing review comments 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
« components/copresence/DEPS ('K') | « components/copresence/rpc/rpc_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/copresence/rpc/rpc_handler_unittest.cc
diff --git a/components/copresence/rpc/rpc_handler_unittest.cc b/components/copresence/rpc/rpc_handler_unittest.cc
index bcdace5254d61b84b0254c476ab1167382b18914..7f32361b248b7939c5c4aa100c4bcf8b45b0f429 100644
--- a/components/copresence/rpc/rpc_handler_unittest.cc
+++ b/components/copresence/rpc/rpc_handler_unittest.cc
@@ -83,10 +83,12 @@ class FakeDirectiveHandler : public DirectiveHandler {
class RpcHandlerTest : public testing::Test, public CopresenceClientDelegate {
public:
- RpcHandlerTest() : rpc_handler_(this), status_(SUCCESS) {
+ RpcHandlerTest() : rpc_handler_(this), status_(SUCCESS), api_key_("API key") {
rpc_handler_.server_post_callback_ =
base::Bind(&RpcHandlerTest::CaptureHttpPost, base::Unretained(this));
rpc_handler_.device_id_ = "Device ID";
+
+ fingerprint_.set_platform_version("Version String");
}
void CaptureHttpPost(
@@ -167,8 +169,12 @@ class RpcHandlerTest : public testing::Test, public CopresenceClientDelegate {
return NULL;
}
- virtual const std::string GetPlatformVersionString() const OVERRIDE {
- return "Version String";
+ virtual const DeviceFingerprint& GetDeviceFingerprint() const OVERRIDE {
+ return fingerprint_;
+ }
+
+ virtual const std::string& GetAPIKey() const OVERRIDE {
+ return api_key_;
}
virtual WhispernetClient* GetWhispernetClient() OVERRIDE {
@@ -180,10 +186,12 @@ class RpcHandlerTest : public testing::Test, public CopresenceClientDelegate {
base::MessageLoop message_loop_;
RpcHandler rpc_handler_;
+ CopresenceStatus status_;
+ std::string api_key_;
+ DeviceFingerprint fingerprint_;
std::string rpc_name_;
scoped_ptr<MessageLite> request_proto_;
- CopresenceStatus status_;
std::map<std::string, std::vector<Message> > messages_by_subscription_;
};
« components/copresence/DEPS ('K') | « components/copresence/rpc/rpc_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698