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

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

Issue 12686006: Rename GoogleServiceAuthError::None() to AuthErrorNone() and LoginFailure::None() to LoginFailureNo… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
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 "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/signin/fake_auth_status_provider.h" 8 #include "chrome/browser/signin/fake_auth_status_provider.h"
9 #include "chrome/browser/signin/signin_manager.h" 9 #include "chrome/browser/signin/signin_manager.h"
10 #include "chrome/browser/signin/signin_manager_factory.h" 10 #include "chrome/browser/signin/signin_manager_factory.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 ASSERT_FALSE(global_error_->HasBadge()); 70 ASSERT_FALSE(global_error_->HasBadge());
71 provider0.SetAuthError( 71 provider0.SetAuthError(
72 GoogleServiceAuthError( 72 GoogleServiceAuthError(
73 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS)); 73 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS));
74 ASSERT_TRUE(global_error_->HasBadge()); 74 ASSERT_TRUE(global_error_->HasBadge());
75 provider1.SetAuthError( 75 provider1.SetAuthError(
76 GoogleServiceAuthError(GoogleServiceAuthError::ACCOUNT_DISABLED)); 76 GoogleServiceAuthError(GoogleServiceAuthError::ACCOUNT_DISABLED));
77 ASSERT_TRUE(global_error_->HasBadge()); 77 ASSERT_TRUE(global_error_->HasBadge());
78 78
79 // Now resolve the auth errors - badge should go away. 79 // Now resolve the auth errors - badge should go away.
80 provider0.SetAuthError(GoogleServiceAuthError::None()); 80 provider0.SetAuthError(GoogleServiceAuthError::AuthErrorNone());
81 ASSERT_TRUE(global_error_->HasBadge()); 81 ASSERT_TRUE(global_error_->HasBadge());
82 provider1.SetAuthError(GoogleServiceAuthError::None()); 82 provider1.SetAuthError(GoogleServiceAuthError::AuthErrorNone());
83 ASSERT_FALSE(global_error_->HasBadge()); 83 ASSERT_FALSE(global_error_->HasBadge());
84 } 84 }
85 ASSERT_FALSE(global_error_->HasBadge()); 85 ASSERT_FALSE(global_error_->HasBadge());
86 } 86 }
87 87
88 // Verify that SigninGlobalError ignores certain errors. 88 // Verify that SigninGlobalError ignores certain errors.
89 TEST_F(SigninGlobalErrorTest, AuthStatusEnumerateAllErrors) { 89 TEST_F(SigninGlobalErrorTest, AuthStatusEnumerateAllErrors) {
90 typedef struct { 90 typedef struct {
91 GoogleServiceAuthError::State error_state; 91 GoogleServiceAuthError::State error_state;
92 bool is_error; 92 bool is_error;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 EXPECT_FALSE(global_error_->HasMenuItem()); 125 EXPECT_FALSE(global_error_->HasMenuItem());
126 #endif 126 #endif
127 EXPECT_EQ(global_error_->MenuItemLabel().empty(), !table[i].is_error); 127 EXPECT_EQ(global_error_->MenuItemLabel().empty(), !table[i].is_error);
128 EXPECT_EQ(global_error_->GetBubbleViewMessage().empty(), 128 EXPECT_EQ(global_error_->GetBubbleViewMessage().empty(),
129 !table[i].is_error); 129 !table[i].is_error);
130 EXPECT_FALSE(global_error_->GetBubbleViewTitle().empty()); 130 EXPECT_FALSE(global_error_->GetBubbleViewTitle().empty());
131 EXPECT_FALSE(global_error_->GetBubbleViewAcceptButtonLabel().empty()); 131 EXPECT_FALSE(global_error_->GetBubbleViewAcceptButtonLabel().empty());
132 EXPECT_TRUE(global_error_->GetBubbleViewCancelButtonLabel().empty()); 132 EXPECT_TRUE(global_error_->GetBubbleViewCancelButtonLabel().empty());
133 } 133 }
134 } 134 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_global_error.cc ('k') | chrome/browser/signin/ubertoken_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698