| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chrome_to_mobile_service.h" | 5 #include "chrome/browser/chrome_to_mobile_service.h" |
| 6 | 6 |
| 7 #include "chrome/browser/signin/token_service.h" | 7 #include "chrome/browser/signin/token_service.h" |
| 8 #include "chrome/common/chrome_notification_types.h" | 8 #include "chrome/common/chrome_notification_types.h" |
| 9 #include "chrome/common/net/gaia/gaia_constants.h" | |
| 10 #include "content/public/browser/notification_details.h" | 9 #include "content/public/browser/notification_details.h" |
| 11 #include "content/public/browser/notification_source.h" | 10 #include "content/public/browser/notification_source.h" |
| 11 #include "google_apis/gaia/gaia_constants.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 const char kDummyString[] = "dummy"; | 16 const char kDummyString[] = "dummy"; |
| 17 | 17 |
| 18 class DummyNotificationSource {}; | 18 class DummyNotificationSource {}; |
| 19 | 19 |
| 20 class MockChromeToMobileService : public ChromeToMobileService { | 20 class MockChromeToMobileService : public ChromeToMobileService { |
| 21 public: | 21 public: |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 DummyNotificationSource dummy_source; | 76 DummyNotificationSource dummy_source; |
| 77 TokenService::TokenAvailableDetails login_details( | 77 TokenService::TokenAvailableDetails login_details( |
| 78 GaiaConstants::kGaiaOAuth2LoginRefreshToken, kDummyString); | 78 GaiaConstants::kGaiaOAuth2LoginRefreshToken, kDummyString); |
| 79 service_.Observe(chrome::NOTIFICATION_TOKEN_AVAILABLE, | 79 service_.Observe(chrome::NOTIFICATION_TOKEN_AVAILABLE, |
| 80 content::Source<DummyNotificationSource>(&dummy_source), | 80 content::Source<DummyNotificationSource>(&dummy_source), |
| 81 content::Details<TokenService::TokenAvailableDetails>(&login_details)); | 81 content::Details<TokenService::TokenAvailableDetails>(&login_details)); |
| 82 EXPECT_TRUE(service_.GetAccessTokenForTest().empty()); | 82 EXPECT_TRUE(service_.GetAccessTokenForTest().empty()); |
| 83 } | 83 } |
| 84 | 84 |
| 85 } // namespace | 85 } // namespace |
| OLD | NEW |