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

Side by Side Diff: chrome/browser/invalidation/gcm_invalidation_bridge_unittest.cc

Issue 1191393008: Introduce a layering in the invalidation component as public and impl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Explicitly forbid content to prevent future additions Created 5 years, 5 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
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/location.h" 5 #include "base/location.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "base/thread_task_runner_handle.h" 8 #include "base/thread_task_runner_handle.h"
9 #include "chrome/browser/signin/account_tracker_service_factory.h" 9 #include "chrome/browser/signin/account_tracker_service_factory.h"
10 #include "chrome/browser/signin/chrome_signin_client_factory.h" 10 #include "chrome/browser/signin/chrome_signin_client_factory.h"
11 #include "chrome/browser/signin/fake_account_tracker_service.h" 11 #include "chrome/browser/signin/fake_account_tracker_service.h"
12 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" 12 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h"
13 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" 13 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h"
14 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 14 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
15 #include "chrome/browser/signin/test_signin_client_builder.h" 15 #include "chrome/browser/signin/test_signin_client_builder.h"
16 #include "chrome/test/base/testing_profile.h" 16 #include "chrome/test/base/testing_profile.h"
17 #include "components/gcm_driver/fake_gcm_driver.h" 17 #include "components/gcm_driver/fake_gcm_driver.h"
18 #include "components/gcm_driver/gcm_driver.h" 18 #include "components/gcm_driver/gcm_driver.h"
19 #include "components/invalidation/gcm_invalidation_bridge.h" 19 #include "components/invalidation/impl/gcm_invalidation_bridge.h"
20 #include "content/public/test/test_browser_thread_bundle.h" 20 #include "content/public/test/test_browser_thread_bundle.h"
21 #include "google_apis/gaia/fake_identity_provider.h" 21 #include "google_apis/gaia/fake_identity_provider.h"
22 #include "google_apis/gaia/google_service_auth_error.h" 22 #include "google_apis/gaia/google_service_auth_error.h"
23 #include "net/base/ip_endpoint.h" 23 #include "net/base/ip_endpoint.h"
24 #include "testing/gtest/include/gtest/gtest.h" 24 #include "testing/gtest/include/gtest/gtest.h"
25 25
26 namespace invalidation { 26 namespace invalidation {
27 namespace { 27 namespace {
28 28
29 // Implementation of GCMDriver::Register that always succeeds with the same 29 // Implementation of GCMDriver::Register that always succeeds with the same
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 bridge_->OnConnected(net::IPEndPoint()); 164 bridge_->OnConnected(net::IPEndPoint());
165 RunLoop(); 165 RunLoop();
166 EXPECT_TRUE(connection_online_); 166 EXPECT_TRUE(connection_online_);
167 bridge_->OnDisconnected(); 167 bridge_->OnDisconnected();
168 RunLoop(); 168 RunLoop();
169 EXPECT_FALSE(connection_online_); 169 EXPECT_FALSE(connection_online_);
170 } 170 }
171 171
172 } // namespace 172 } // namespace
173 } // namespace invalidation 173 } // namespace invalidation
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698