Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(977)

Side by Side Diff: chrome/browser/signin/signin_global_error_unittest.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/signin_global_error.h" 5 #include "chrome/browser/signin/signin_global_error.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/prefs/pref_service.h"
12 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
13 #include "base/test/histogram_tester.h" 12 #include "base/test/histogram_tester.h"
14 #include "chrome/browser/profiles/profile_info_cache.h" 13 #include "chrome/browser/profiles/profile_info_cache.h"
15 #include "chrome/browser/profiles/profile_manager.h" 14 #include "chrome/browser/profiles/profile_manager.h"
16 #include "chrome/browser/profiles/profile_metrics.h" 15 #include "chrome/browser/profiles/profile_metrics.h"
17 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" 16 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h"
18 #include "chrome/browser/signin/fake_signin_manager_builder.h" 17 #include "chrome/browser/signin/fake_signin_manager_builder.h"
19 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 18 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
20 #include "chrome/browser/signin/signin_error_controller_factory.h" 19 #include "chrome/browser/signin/signin_error_controller_factory.h"
21 #include "chrome/browser/signin/signin_global_error_factory.h" 20 #include "chrome/browser/signin/signin_global_error_factory.h"
22 #include "chrome/browser/signin/signin_manager_factory.h" 21 #include "chrome/browser/signin/signin_manager_factory.h"
23 #include "chrome/browser/ui/global_error/global_error_service.h" 22 #include "chrome/browser/ui/global_error/global_error_service.h"
24 #include "chrome/browser/ui/global_error/global_error_service_factory.h" 23 #include "chrome/browser/ui/global_error/global_error_service_factory.h"
25 #include "chrome/common/pref_names.h" 24 #include "chrome/common/pref_names.h"
26 #include "chrome/test/base/testing_browser_process.h" 25 #include "chrome/test/base/testing_browser_process.h"
27 #include "chrome/test/base/testing_profile.h" 26 #include "chrome/test/base/testing_profile.h"
28 #include "chrome/test/base/testing_profile_manager.h" 27 #include "chrome/test/base/testing_profile_manager.h"
28 #include "components/prefs/pref_service.h"
29 #include "components/signin/core/browser/fake_auth_status_provider.h" 29 #include "components/signin/core/browser/fake_auth_status_provider.h"
30 #include "components/signin/core/browser/signin_error_controller.h" 30 #include "components/signin/core/browser/signin_error_controller.h"
31 #include "components/signin/core/browser/signin_manager.h" 31 #include "components/signin/core/browser/signin_manager.h"
32 #include "components/syncable_prefs/pref_service_syncable.h" 32 #include "components/syncable_prefs/pref_service_syncable.h"
33 #include "content/public/test/test_browser_thread_bundle.h" 33 #include "content/public/test/test_browser_thread_bundle.h"
34 #include "testing/gtest/include/gtest/gtest.h" 34 #include "testing/gtest/include/gtest/gtest.h"
35 35
36 static const char kTestAccountId[] = "id-testuser@test.com"; 36 static const char kTestAccountId[] = "id-testuser@test.com";
37 static const char kTestGaiaId[] = "gaiaid-testuser@test.com"; 37 static const char kTestGaiaId[] = "gaiaid-testuser@test.com";
38 static const char kTestUsername[] = "testuser@test.com"; 38 static const char kTestUsername[] = "testuser@test.com";
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 ProfileMetrics::LogNumberOfProfiles( 165 ProfileMetrics::LogNumberOfProfiles(
166 testing_profile_manager()->profile_manager()); 166 testing_profile_manager()->profile_manager());
167 167
168 if (table[i].is_error) 168 if (table[i].is_error)
169 histogram_tester.ExpectBucketCount("Signin.AuthError", i, 1); 169 histogram_tester.ExpectBucketCount("Signin.AuthError", i, 1);
170 histogram_tester.ExpectBucketCount( 170 histogram_tester.ExpectBucketCount(
171 "Profile.NumberOfProfilesWithAuthErrors", table[i].is_error, 1); 171 "Profile.NumberOfProfilesWithAuthErrors", table[i].is_error, 1);
172 } 172 }
173 } 173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698