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 "base/run_loop.h" | 5 #include "base/run_loop.h" |
6 #include "chrome/browser/invalidation/gcm_invalidation_bridge.h" | 6 #include "chrome/browser/invalidation/gcm_invalidation_bridge.h" |
7 #include "chrome/browser/services/gcm/gcm_driver.h" | |
8 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" | 7 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" |
9 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" | 8 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" |
10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 9 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
11 #include "chrome/test/base/testing_profile.h" | 10 #include "chrome/test/base/testing_profile.h" |
| 11 #include "components/gcm_driver/gcm_driver.h" |
12 #include "content/public/test/test_browser_thread_bundle.h" | 12 #include "content/public/test/test_browser_thread_bundle.h" |
13 #include "google_apis/gaia/fake_identity_provider.h" | 13 #include "google_apis/gaia/fake_identity_provider.h" |
14 #include "google_apis/gaia/google_service_auth_error.h" | 14 #include "google_apis/gaia/google_service_auth_error.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 namespace invalidation { | 17 namespace invalidation { |
18 namespace { | 18 namespace { |
19 | 19 |
20 // Implementation of GCMDriver::Register that always succeeds with the same | 20 // Implementation of GCMDriver::Register that always succeeds with the same |
21 // registrationId. | 21 // registrationId. |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 delegate_->Register(base::Bind(&GCMInvalidationBridgeTest::RegisterFinished, | 130 delegate_->Register(base::Bind(&GCMInvalidationBridgeTest::RegisterFinished, |
131 base::Unretained(this))); | 131 base::Unretained(this))); |
132 base::RunLoop run_loop; | 132 base::RunLoop run_loop; |
133 run_loop.RunUntilIdle(); | 133 run_loop.RunUntilIdle(); |
134 | 134 |
135 EXPECT_FALSE(registration_id_.empty()); | 135 EXPECT_FALSE(registration_id_.empty()); |
136 } | 136 } |
137 | 137 |
138 } // namespace | 138 } // namespace |
139 } // namespace invalidation | 139 } // namespace invalidation |
OLD | NEW |