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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc

Issue 2118593002: mash: Migrate ShellDelegate ownership and access to WmShell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/ui/ash/launcher/chrome_launcher_controller_impl.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <set> 12 #include <set>
13 #include <string> 13 #include <string>
14 #include <utility> 14 #include <utility>
15 #include <vector> 15 #include <vector>
16 16
17 #include "ash/common/ash_switches.h" 17 #include "ash/common/ash_switches.h"
18 #include "ash/common/shelf/shelf_item_delegate_manager.h" 18 #include "ash/common/shelf/shelf_item_delegate_manager.h"
19 #include "ash/common/shelf/shelf_model.h" 19 #include "ash/common/shelf/shelf_model.h"
20 #include "ash/common/shelf/shelf_model_observer.h" 20 #include "ash/common/shelf/shelf_model_observer.h"
21 #include "ash/common/wm_shell.h"
21 #include "ash/shell.h" 22 #include "ash/shell.h"
22 #include "ash/test/ash_test_helper.h" 23 #include "ash/test/ash_test_helper.h"
23 #include "ash/test/shelf_item_delegate_manager_test_api.h" 24 #include "ash/test/shelf_item_delegate_manager_test_api.h"
24 #include "ash/test/test_session_state_delegate.h" 25 #include "ash/test/test_session_state_delegate.h"
25 #include "ash/test/test_shell_delegate.h" 26 #include "ash/test/test_shell_delegate.h"
26 #include "base/command_line.h" 27 #include "base/command_line.h"
27 #include "base/compiler_specific.h" 28 #include "base/compiler_specific.h"
28 #include "base/files/file_path.h" 29 #include "base/files/file_path.h"
29 #include "base/location.h" 30 #include "base/location.h"
30 #include "base/macros.h" 31 #include "base/macros.h"
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 // Initialize the WallpaperManager singleton. 1032 // Initialize the WallpaperManager singleton.
1032 chromeos::WallpaperManager::Initialize(); 1033 chromeos::WallpaperManager::Initialize();
1033 1034
1034 // Initialize the rest. 1035 // Initialize the rest.
1035 ChromeLauncherControllerImplTest::SetUp(); 1036 ChromeLauncherControllerImplTest::SetUp();
1036 1037
1037 // Get some base objects. 1038 // Get some base objects.
1038 ash::test::AshTestHelper::GetTestSessionStateDelegate() 1039 ash::test::AshTestHelper::GetTestSessionStateDelegate()
1039 ->set_logged_in_users(2); 1040 ->set_logged_in_users(2);
1040 shell_delegate_ = static_cast<ash::test::TestShellDelegate*>( 1041 shell_delegate_ = static_cast<ash::test::TestShellDelegate*>(
1041 ash::Shell::GetInstance()->delegate()); 1042 ash::WmShell::Get()->delegate());
1042 shell_delegate_->set_multi_profiles_enabled(true); 1043 shell_delegate_->set_multi_profiles_enabled(true);
1043 } 1044 }
1044 1045
1045 void TearDown() override { 1046 void TearDown() override {
1046 ChromeLauncherControllerImplTest::TearDown(); 1047 ChromeLauncherControllerImplTest::TearDown();
1047 user_manager_enabler_.reset(); 1048 user_manager_enabler_.reset();
1048 for (ProfileToNameMap::iterator it = created_profiles_.begin(); 1049 for (ProfileToNameMap::iterator it = created_profiles_.begin();
1049 it != created_profiles_.end(); ++it) 1050 it != created_profiles_.end(); ++it)
1050 profile_manager_->DeleteTestingProfile(it->second); 1051 profile_manager_->DeleteTestingProfile(it->second);
1051 chromeos::WallpaperManager::Shutdown(); 1052 chromeos::WallpaperManager::Shutdown();
(...skipping 2367 matching lines...) Expand 10 before | Expand all | Expand 10 after
3419 // be automatically removed. 3420 // be automatically removed.
3420 EnableArc(false); 3421 EnableArc(false);
3421 ValidateArcState(false, false, arc::ArcAuthService::State::STOPPED, 3422 ValidateArcState(false, false, arc::ArcAuthService::State::STOPPED,
3422 "AppList, Chrome"); 3423 "AppList, Chrome");
3423 3424
3424 // Even if re-enable it again, Play Store pin does not appear automatically. 3425 // Even if re-enable it again, Play Store pin does not appear automatically.
3425 EnableArc(true); 3426 EnableArc(true);
3426 ValidateArcState(true, false, arc::ArcAuthService::State::FETCHING_CODE, 3427 ValidateArcState(true, false, arc::ArcAuthService::State::FETCHING_CODE,
3427 "AppList, Chrome"); 3428 "AppList, Chrome");
3428 } 3429 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698