| OLD | NEW |
| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(table); ++i) { | 111 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(table); ++i) { |
| 112 FakeAuthStatusProvider provider(global_error_); | 112 FakeAuthStatusProvider provider(global_error_); |
| 113 provider.SetAuthError(GoogleServiceAuthError(table[i].error_state)); | 113 provider.SetAuthError(GoogleServiceAuthError(table[i].error_state)); |
| 114 EXPECT_EQ(global_error_->HasMenuItem(), table[i].is_error); | 114 EXPECT_EQ(global_error_->HasMenuItem(), table[i].is_error); |
| 115 // Only on chromeos do we have a separate menu item - on other platforms | 115 // Only on chromeos do we have a separate menu item - on other platforms |
| 116 // there's code in WrenchMenuModel to re-use the "sign in to chrome" | 116 // there's code in WrenchMenuModel to re-use the "sign in to chrome" |
| 117 // menu item to display auth status/errors. | 117 // menu item to display auth status/errors. |
| 118 EXPECT_EQ(global_error_->HasMenuItem(), table[i].is_error); | 118 EXPECT_EQ(global_error_->HasMenuItem(), table[i].is_error); |
| 119 EXPECT_EQ(global_error_->MenuItemLabel().empty(), !table[i].is_error); | 119 EXPECT_EQ(global_error_->MenuItemLabel().empty(), !table[i].is_error); |
| 120 EXPECT_EQ(global_error_->GetBubbleViewMessage().empty(), | 120 EXPECT_EQ(global_error_->GetBubbleViewMessages().empty(), |
| 121 !table[i].is_error); | 121 !table[i].is_error); |
| 122 EXPECT_FALSE(global_error_->GetBubbleViewTitle().empty()); | 122 EXPECT_FALSE(global_error_->GetBubbleViewTitle().empty()); |
| 123 EXPECT_FALSE(global_error_->GetBubbleViewAcceptButtonLabel().empty()); | 123 EXPECT_FALSE(global_error_->GetBubbleViewAcceptButtonLabel().empty()); |
| 124 EXPECT_TRUE(global_error_->GetBubbleViewCancelButtonLabel().empty()); | 124 EXPECT_TRUE(global_error_->GetBubbleViewCancelButtonLabel().empty()); |
| 125 } | 125 } |
| 126 } | 126 } |
| OLD | NEW |