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

Side by Side Diff: sync/notifier/sync_system_resources_unittest.cc

Issue 116533006: Control invalidations network channel from TiclInvalidationService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sync/notifier/sync_system_resources.h" 5 #include "sync/notifier/sync_system_resources.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 TestSyncNetworkChannel() {} 181 TestSyncNetworkChannel() {}
182 virtual ~TestSyncNetworkChannel() {} 182 virtual ~TestSyncNetworkChannel() {}
183 183
184 using SyncNetworkChannel::NotifyStateChange; 184 using SyncNetworkChannel::NotifyStateChange;
185 using SyncNetworkChannel::DeliverIncomingMessage; 185 using SyncNetworkChannel::DeliverIncomingMessage;
186 186
187 virtual void SendEncodedMessage(const std::string& encoded_message) OVERRIDE { 187 virtual void SendEncodedMessage(const std::string& encoded_message) OVERRIDE {
188 last_encoded_message_ = encoded_message; 188 last_encoded_message_ = encoded_message;
189 } 189 }
190 190
191 virtual void UpdateCredentials(const std::string& email,
192 const std::string& token) OVERRIDE {
193 }
194
191 std::string last_encoded_message_; 195 std::string last_encoded_message_;
192 }; 196 };
193 197
194 class SyncNetworkChannelTest 198 class SyncNetworkChannelTest
195 : public testing::Test, 199 : public testing::Test,
196 public SyncNetworkChannel::Observer { 200 public SyncNetworkChannel::Observer {
197 protected: 201 protected:
198 SyncNetworkChannelTest() 202 SyncNetworkChannelTest()
199 : last_invalidator_state_(DEFAULT_INVALIDATION_ERROR), 203 : last_invalidator_state_(DEFAULT_INVALIDATION_ERROR),
200 connected_(false) { 204 connected_(false) {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 network_channel_.last_encoded_message_, 398 network_channel_.last_encoded_message_,
395 &message, &service_context, &scheduling_hash)); 399 &message, &service_context, &scheduling_hash));
396 EXPECT_EQ(kMessage, message); 400 EXPECT_EQ(kMessage, message);
397 EXPECT_EQ(kServiceContext, service_context); 401 EXPECT_EQ(kServiceContext, service_context);
398 EXPECT_EQ(kSchedulingHash, scheduling_hash); 402 EXPECT_EQ(kSchedulingHash, scheduling_hash);
399 } 403 }
400 } 404 }
401 405
402 } // namespace 406 } // namespace
403 } // namespace syncer 407 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698