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

Side by Side Diff: components/invalidation/gcm_network_channel_unittest.cc

Issue 294123004: Move some sync/notifier to components/invalidation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/run_loop.h" 5 #include "base/run_loop.h"
6 #include "base/strings/string_util.h" 6 #include "base/strings/string_util.h"
7 #include "components/invalidation/gcm_network_channel.h"
7 #include "google_apis/gaia/google_service_auth_error.h" 8 #include "google_apis/gaia/google_service_auth_error.h"
8 #include "net/url_request/test_url_fetcher_factory.h" 9 #include "net/url_request/test_url_fetcher_factory.h"
9 #include "net/url_request/url_request_test_util.h" 10 #include "net/url_request/url_request_test_util.h"
10 #include "sync/notifier/gcm_network_channel.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace syncer { 13 namespace syncer {
14 14
15 class TestGCMNetworkChannelDelegate : public GCMNetworkChannelDelegate { 15 class TestGCMNetworkChannelDelegate : public GCMNetworkChannelDelegate {
16 public: 16 public:
17 TestGCMNetworkChannelDelegate() 17 TestGCMNetworkChannelDelegate()
18 : register_call_count_(0) {} 18 : register_call_count_(0) {}
19 19
20 virtual void Initialize() OVERRIDE {} 20 virtual void Initialize() OVERRIDE {}
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 delegate()->request_token_callback.Run( 485 delegate()->request_token_callback.Run(
486 GoogleServiceAuthError::AuthErrorNone(), "access.token"); 486 GoogleServiceAuthError::AuthErrorNone(), "access.token");
487 RunLoopUntilIdle(); 487 RunLoopUntilIdle();
488 EXPECT_EQ(url_fetchers_created_count(), 3); 488 EXPECT_EQ(url_fetchers_created_count(), 3);
489 // Echo_token should be from second message. 489 // Echo_token should be from second message.
490 EXPECT_EQ("echo.token", get_last_echo_token()); 490 EXPECT_EQ("echo.token", get_last_echo_token());
491 } 491 }
492 #endif 492 #endif
493 493
494 } // namespace syncer 494 } // namespace syncer
OLDNEW
« no previous file with comments | « components/invalidation/gcm_network_channel_delegate.h ('k') | components/invalidation/invalidation_export.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698