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/signin_error_notifier_ash.h" | 5 #include "chrome/browser/signin/signin_error_notifier_ash.h" |
6 | 6 |
7 #include "ash/test/ash_test_base.h" | 7 #include "ash/test/ash_test_base.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/notifications/notification.h" | 10 #include "chrome/browser/notifications/notification.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 ASSERT_TRUE(notification_ui_manager_->FindById(kNotificationId)); | 137 ASSERT_TRUE(notification_ui_manager_->FindById(kNotificationId)); |
138 } | 138 } |
139 // error_provider is removed now that we've left that scope. | 139 // error_provider is removed now that we've left that scope. |
140 ASSERT_FALSE(notification_ui_manager_->FindById(kNotificationId)); | 140 ASSERT_FALSE(notification_ui_manager_->FindById(kNotificationId)); |
141 } | 141 } |
142 // All providers should be removed now. | 142 // All providers should be removed now. |
143 ASSERT_FALSE(notification_ui_manager_->FindById(kNotificationId)); | 143 ASSERT_FALSE(notification_ui_manager_->FindById(kNotificationId)); |
144 } | 144 } |
145 #endif | 145 #endif |
146 | 146 |
147 TEST_F(SigninErrorNotifierTest, AuthStatusProviderErrorTransition) { | 147 #if defined(OS_WIN) |
| 148 // Test started crashing on Win 7. http://crbug.com/372277 |
| 149 #define MAYBE_AuthStatusProviderErrorTransition \ |
| 150 DISABLED_AuthStatusProviderErrorTransition |
| 151 #else |
| 152 #define MAYBE_AuthStatusProviderErrorTransition \ |
| 153 AuthStatusProviderErrorTransition |
| 154 #endif |
| 155 TEST_F(SigninErrorNotifierTest, MAYBE_AuthStatusProviderErrorTransition) { |
148 { | 156 { |
149 FakeAuthStatusProvider provider0(error_controller_); | 157 FakeAuthStatusProvider provider0(error_controller_); |
150 FakeAuthStatusProvider provider1(error_controller_); | 158 FakeAuthStatusProvider provider1(error_controller_); |
151 provider0.SetAuthError( | 159 provider0.SetAuthError( |
152 kTestAccountId, | 160 kTestAccountId, |
153 GoogleServiceAuthError( | 161 GoogleServiceAuthError( |
154 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS)); | 162 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS)); |
155 ASSERT_TRUE(notification_ui_manager_->FindById(kNotificationId)); | 163 ASSERT_TRUE(notification_ui_manager_->FindById(kNotificationId)); |
156 | 164 |
157 base::string16 message; | 165 base::string16 message; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 EXPECT_FALSE(notification->title().empty()); | 226 EXPECT_FALSE(notification->title().empty()); |
219 EXPECT_FALSE(notification->message().empty()); | 227 EXPECT_FALSE(notification->message().empty()); |
220 EXPECT_EQ((size_t)1, notification->buttons().size()); | 228 EXPECT_EQ((size_t)1, notification->buttons().size()); |
221 } | 229 } |
222 } | 230 } |
223 } | 231 } |
224 #endif | 232 #endif |
225 | 233 |
226 } // namespace test | 234 } // namespace test |
227 } // namespace ash | 235 } // namespace ash |
OLD | NEW |