| OLD | NEW |
| 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 "components/invalidation/impl/gcm_invalidation_bridge.h" | 5 #include "components/invalidation/impl/gcm_invalidation_bridge.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/macros.h" |
| 9 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| 10 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
| 11 #include "base/thread_task_runner_handle.h" | 12 #include "base/thread_task_runner_handle.h" |
| 12 #include "components/gcm_driver/fake_gcm_driver.h" | 13 #include "components/gcm_driver/fake_gcm_driver.h" |
| 13 #include "components/gcm_driver/gcm_driver.h" | 14 #include "components/gcm_driver/gcm_driver.h" |
| 14 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" | 15 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" |
| 15 #include "google_apis/gaia/fake_identity_provider.h" | 16 #include "google_apis/gaia/fake_identity_provider.h" |
| 16 #include "google_apis/gaia/google_service_auth_error.h" | 17 #include "google_apis/gaia/google_service_auth_error.h" |
| 17 #include "net/base/ip_endpoint.h" | 18 #include "net/base/ip_endpoint.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 bridge_->OnConnected(net::IPEndPoint()); | 149 bridge_->OnConnected(net::IPEndPoint()); |
| 149 RunLoop(); | 150 RunLoop(); |
| 150 EXPECT_TRUE(connection_online_); | 151 EXPECT_TRUE(connection_online_); |
| 151 bridge_->OnDisconnected(); | 152 bridge_->OnDisconnected(); |
| 152 RunLoop(); | 153 RunLoop(); |
| 153 EXPECT_FALSE(connection_online_); | 154 EXPECT_FALSE(connection_online_); |
| 154 } | 155 } |
| 155 | 156 |
| 156 } // namespace | 157 } // namespace |
| 157 } // namespace invalidation | 158 } // namespace invalidation |
| OLD | NEW |