| 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/sync/sync_error_notifier_ash.h" | 5 #include "chrome/browser/sync/sync_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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 ASSERT_TRUE(profile_manager_->SetUp()); | 102 ASSERT_TRUE(profile_manager_->SetUp()); |
| 103 | 103 |
| 104 profile_ = profile_manager_->CreateTestingProfile(kTestAccountId); | 104 profile_ = profile_manager_->CreateTestingProfile(kTestAccountId); |
| 105 | 105 |
| 106 TestingBrowserProcess::GetGlobal(); | 106 TestingBrowserProcess::GetGlobal(); |
| 107 AshTestBase::SetUp(); | 107 AshTestBase::SetUp(); |
| 108 | 108 |
| 109 // Set up a desktop screen for Windows to hold native widgets, used when | 109 // Set up a desktop screen for Windows to hold native widgets, used when |
| 110 // adding desktop widgets (i.e., message center notifications). | 110 // adding desktop widgets (i.e., message center notifications). |
| 111 #if defined(OS_WIN) | 111 #if defined(OS_WIN) |
| 112 aura::TestScreen* test_screen = aura::TestScreen::Create(); | 112 aura::TestScreen* test_screen = aura::TestScreen::Create(gfx::Size()); |
| 113 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen); | 113 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen); |
| 114 gfx::Screen::SetScreenTypeDelegate(new ScreenTypeDelegateDesktop); | 114 gfx::Screen::SetScreenTypeDelegate(new ScreenTypeDelegateDesktop); |
| 115 #endif | 115 #endif |
| 116 | 116 |
| 117 service_.reset(new NiceMock<ProfileSyncServiceMock>(profile_)); | 117 service_.reset(new NiceMock<ProfileSyncServiceMock>(profile_)); |
| 118 | 118 |
| 119 FakeLoginUIService* login_ui_service = static_cast<FakeLoginUIService*>( | 119 FakeLoginUIService* login_ui_service = static_cast<FakeLoginUIService*>( |
| 120 LoginUIServiceFactory::GetInstance()->SetTestingFactoryAndUse( | 120 LoginUIServiceFactory::GetInstance()->SetTestingFactoryAndUse( |
| 121 profile_, BuildMockLoginUIService)); | 121 profile_, BuildMockLoginUIService)); |
| 122 login_ui_service->SetLoginUI(&login_ui_); | 122 login_ui_service->SetLoginUI(&login_ui_); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 SCOPED_TRACE("Not expecting notification since sync setup is incomplete"); | 225 SCOPED_TRACE("Not expecting notification since sync setup is incomplete"); |
| 226 VerifySyncErrorNotifierResult( | 226 VerifySyncErrorNotifierResult( |
| 227 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, | 227 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, |
| 228 false /* not signed in */, | 228 false /* not signed in */, |
| 229 false /* no error */); | 229 false /* no error */); |
| 230 } | 230 } |
| 231 } | 231 } |
| 232 | 232 |
| 233 } // namespace test | 233 } // namespace test |
| 234 } // namespace ash | 234 } // namespace ash |
| OLD | NEW |