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

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

Issue 485793003: Removing OptInStateFilter settings, which are only for authenticated users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « 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 70c727ea4911a1bfc981c01b69bd713078f250cb..a0fff7412e9c8ee2d953ee29b841fcd56cf09913 100644
--- a/components/copresence/rpc/rpc_handler_unittest.cc
+++ b/components/copresence/rpc/rpc_handler_unittest.cc
@@ -256,39 +256,6 @@ TEST_F(RpcHandlerTest, GetDeviceCapabilities) {
}
#endif
-TEST_F(RpcHandlerTest, AllowOptedOutMessages) {
- // Request with no filter specified.
- scoped_ptr<ReportRequest> report(new ReportRequest);
- report->mutable_manage_messages_request()->add_message_to_publish()
- ->set_id("message");
- report->mutable_manage_subscriptions_request()->add_subscription()
- ->set_id("subscription");
- rpc_handler_.SendReportRequest(report.Pass());
- const OptInStateFilter& filter =
- GetMessagesPublished().Get(0).opt_in_state_filter();
- ASSERT_EQ(2, filter.allowed_opt_in_state_size());
- EXPECT_EQ(OPTED_IN, filter.allowed_opt_in_state(0));
- EXPECT_EQ(OPTED_OUT, filter.allowed_opt_in_state(1));
- EXPECT_EQ(2, GetSubscriptionsSent().Get(0).opt_in_state_filter()
- .allowed_opt_in_state_size());
-
- // Request with filters already specified.
- report.reset(new ReportRequest);
- report->mutable_manage_messages_request()->add_message_to_publish()
- ->mutable_opt_in_state_filter()->add_allowed_opt_in_state(OPTED_IN);
- report->mutable_manage_subscriptions_request()->add_subscription()
- ->mutable_opt_in_state_filter()->add_allowed_opt_in_state(OPTED_OUT);
- rpc_handler_.SendReportRequest(report.Pass());
- const OptInStateFilter& publish_filter =
- GetMessagesPublished().Get(0).opt_in_state_filter();
- ASSERT_EQ(1, publish_filter.allowed_opt_in_state_size());
- EXPECT_EQ(OPTED_IN, publish_filter.allowed_opt_in_state(0));
- const OptInStateFilter& subscription_filter =
- GetSubscriptionsSent().Get(0).opt_in_state_filter();
- ASSERT_EQ(1, subscription_filter.allowed_opt_in_state_size());
- EXPECT_EQ(OPTED_OUT, subscription_filter.allowed_opt_in_state(0));
-}
-
TEST_F(RpcHandlerTest, CreateRequestHeader) {
SetDeviceId("CreateRequestHeader Device ID");
rpc_handler_.SendReportRequest(make_scoped_ptr(new ReportRequest),
« no previous file with comments | « components/copresence/rpc/rpc_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698