| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "chrome/test/base/testing_profile.h" | 22 #include "chrome/test/base/testing_profile.h" |
| 23 #include "chrome/test/base/testing_profile_manager.h" | 23 #include "chrome/test/base/testing_profile_manager.h" |
| 24 #include "components/signin/core/browser/fake_auth_status_provider.h" | 24 #include "components/signin/core/browser/fake_auth_status_provider.h" |
| 25 #include "components/signin/core/browser/signin_error_controller.h" | 25 #include "components/signin/core/browser/signin_error_controller.h" |
| 26 #include "components/signin/core/browser/signin_manager.h" | 26 #include "components/signin/core/browser/signin_manager.h" |
| 27 #include "content/public/test/test_browser_thread_bundle.h" | 27 #include "content/public/test/test_browser_thread_bundle.h" |
| 28 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
| 29 #include "ui/message_center/notification.h" | 29 #include "ui/message_center/notification.h" |
| 30 | 30 |
| 31 #if defined(OS_WIN) | 31 #if defined(OS_WIN) |
| 32 #include "chrome/browser/ui/ash/ash_util.h" | |
| 33 #include "ui/aura/test/test_screen.h" | 32 #include "ui/aura/test/test_screen.h" |
| 34 #include "ui/display/screen.h" | 33 #include "ui/display/screen.h" |
| 35 #endif | 34 #endif |
| 36 | 35 |
| 37 #if defined(OS_CHROMEOS) | 36 #if defined(OS_CHROMEOS) |
| 38 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" | 37 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" |
| 39 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" | 38 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" |
| 40 #endif | 39 #endif |
| 41 | 40 |
| 42 namespace ash { | 41 namespace ash { |
| 43 namespace test { | 42 namespace test { |
| 44 | 43 |
| 45 namespace { | 44 namespace { |
| 46 | 45 |
| 47 static const char kTestAccountId[] = "testuser@test.com"; | 46 static const char kTestAccountId[] = "testuser@test.com"; |
| 48 | 47 |
| 49 // Notification ID corresponding to kProfileSigninNotificationId + | 48 // Notification ID corresponding to kProfileSigninNotificationId + |
| 50 // kTestAccountId. | 49 // kTestAccountId. |
| 51 static const std::string kNotificationId = | 50 static const char kNotificationId[] = |
| 52 "chrome://settings/signin/testuser@test.com"; | 51 "chrome://settings/signin/testuser@test.com"; |
| 53 } | 52 } |
| 54 | 53 |
| 55 class SigninErrorNotifierTest : public AshTestBase { | 54 class SigninErrorNotifierTest : public AshTestBase { |
| 56 public: | 55 public: |
| 57 void SetUp() override { | 56 void SetUp() override { |
| 58 // Create a signed-in profile. | 57 // Create a signed-in profile. |
| 59 TestingProfile::Builder builder; | 58 TestingProfile::Builder builder; |
| 60 builder.AddTestingFactory(SigninManagerFactory::GetInstance(), | 59 builder.AddTestingFactory(SigninManagerFactory::GetInstance(), |
| 61 BuildFakeSigninManagerBase); | 60 BuildFakeSigninManagerBase); |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 EXPECT_FALSE(notification->title().empty()); | 248 EXPECT_FALSE(notification->title().empty()); |
| 250 EXPECT_FALSE(notification->message().empty()); | 249 EXPECT_FALSE(notification->message().empty()); |
| 251 EXPECT_EQ((size_t)1, notification->buttons().size()); | 250 EXPECT_EQ((size_t)1, notification->buttons().size()); |
| 252 } | 251 } |
| 253 } | 252 } |
| 254 } | 253 } |
| 255 #endif | 254 #endif |
| 256 | 255 |
| 257 } // namespace test | 256 } // namespace test |
| 258 } // namespace ash | 257 } // namespace ash |
| OLD | NEW |