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

Unified Diff: sync/notifier/gcm_network_channel_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 6 years, 12 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 | « sync/notifier/gcm_network_channel.cc ('k') | sync/notifier/invalidation_notifier.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/gcm_network_channel_unittest.cc
diff --git a/sync/notifier/gcm_network_channel_unittest.cc b/sync/notifier/gcm_network_channel_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c56abd65517de72012d1dcec679c2135a1868c0a
--- /dev/null
+++ b/sync/notifier/gcm_network_channel_unittest.cc
@@ -0,0 +1,40 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "sync/notifier/gcm_network_channel.h"
+
+#include "base/compiler_specific.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace syncer {
+namespace {
+
+class GCMNetworkChannelTest
+ : public ::testing::Test,
+ public SyncNetworkChannel::Observer {
+ protected:
+ GCMNetworkChannelTest()
+ : gcm_network_channel_() {
+ gcm_network_channel_.AddObserver(this);
+ gcm_network_channel_.SetMessageReceiver(
+ invalidation::NewPermanentCallback(
+ this, &GCMNetworkChannelTest::OnIncomingMessage));
+ }
+
+ virtual ~GCMNetworkChannelTest() {
+ gcm_network_channel_.RemoveObserver(this);
+ }
+
+ virtual void OnNetworkChannelStateChanged(
+ InvalidatorState invalidator_state) OVERRIDE {
+ }
+
+ void OnIncomingMessage(std::string incoming_message) {
+ }
+
+ GCMNetworkChannel gcm_network_channel_;
+};
+
+} // namespace
+} // namespace syncer
« no previous file with comments | « sync/notifier/gcm_network_channel.cc ('k') | sync/notifier/invalidation_notifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698