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 "chrome/browser/signin/chrome_signin_status_metrics_provider_delegate.h
" | 5 #include "chrome/browser/signin/chrome_signin_status_metrics_provider_delegate.h
" |
6 | 6 |
| 7 #include "build/build_config.h" |
7 #include "components/signin/core/browser/signin_status_metrics_provider.h" | 8 #include "components/signin/core/browser/signin_status_metrics_provider.h" |
8 #include "content/public/test/test_browser_thread_bundle.h" | 9 #include "content/public/test/test_browser_thread_bundle.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
10 | 11 |
11 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 12 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
12 TEST(ChromeSigninStatusMetricsProviderDelegateTest, | 13 TEST(ChromeSigninStatusMetricsProviderDelegateTest, |
13 UpdateStatusWhenBrowserAdded) { | 14 UpdateStatusWhenBrowserAdded) { |
14 content::TestBrowserThreadBundle thread_bundle; | 15 content::TestBrowserThreadBundle thread_bundle; |
15 | 16 |
16 scoped_ptr<ChromeSigninStatusMetricsProviderDelegate> delegate( | 17 scoped_ptr<ChromeSigninStatusMetricsProviderDelegate> delegate( |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 EXPECT_EQ(SigninStatusMetricsProviderBase::MIXED_SIGNIN_STATUS, | 50 EXPECT_EQ(SigninStatusMetricsProviderBase::MIXED_SIGNIN_STATUS, |
50 metrics_provider->GetSigninStatusForTesting()); | 51 metrics_provider->GetSigninStatusForTesting()); |
51 | 52 |
52 // Initial status is mixed and then a signed-out browser is opened. | 53 // Initial status is mixed and then a signed-out browser is opened. |
53 metrics_provider->UpdateInitialSigninStatusForTesting(2, 1); | 54 metrics_provider->UpdateInitialSigninStatusForTesting(2, 1); |
54 raw_delegate->UpdateStatusWhenBrowserAdded(false); | 55 raw_delegate->UpdateStatusWhenBrowserAdded(false); |
55 EXPECT_EQ(SigninStatusMetricsProviderBase::MIXED_SIGNIN_STATUS, | 56 EXPECT_EQ(SigninStatusMetricsProviderBase::MIXED_SIGNIN_STATUS, |
56 metrics_provider->GetSigninStatusForTesting()); | 57 metrics_provider->GetSigninStatusForTesting()); |
57 } | 58 } |
58 #endif | 59 #endif |
OLD | NEW |