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
3 // found in the LICENSE file.
5 #include "chrome/browser/metrics/signin_status_metrics_provider_chromeos.h"
9 #include "base/files/file_path.h"
10 #include "testing/gtest/include/gtest/gtest.h"
12 TEST(SigninStatusMetricsProviderChromeOS
, ComputeSigninStatusToUpload
) {
13 SigninStatusMetricsProviderChromeOS metrics_provider
=
14 SigninStatusMetricsProviderChromeOS();
16 SigninStatusMetricsProviderBase::SigninStatus status_to_upload
=
17 metrics_provider
.ComputeSigninStatusToUpload(
18 SigninStatusMetricsProviderBase::ALL_PROFILES_SIGNED_IN
, true);
19 EXPECT_EQ(SigninStatusMetricsProviderBase::ALL_PROFILES_SIGNED_IN
,
22 status_to_upload
= metrics_provider
.ComputeSigninStatusToUpload(
23 SigninStatusMetricsProviderBase::ALL_PROFILES_NOT_SIGNED_IN
, false);
24 EXPECT_EQ(SigninStatusMetricsProviderBase::ALL_PROFILES_NOT_SIGNED_IN
,
27 status_to_upload
= metrics_provider
.ComputeSigninStatusToUpload(
28 SigninStatusMetricsProviderBase::ALL_PROFILES_NOT_SIGNED_IN
, true);
29 EXPECT_EQ(SigninStatusMetricsProviderBase::MIXED_SIGNIN_STATUS
,
32 status_to_upload
= metrics_provider
.ComputeSigninStatusToUpload(
33 SigninStatusMetricsProviderBase::ALL_PROFILES_SIGNED_IN
, false);
34 EXPECT_EQ(SigninStatusMetricsProviderBase::ERROR_GETTING_SIGNIN_STATUS
,