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

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

Issue 2906803002: Rename MaximizeMode to TabletMode (Closed)
Patch Set: updated filter Created 3 years, 7 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.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.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/display/display_configuration_controller.h" 17 #include "ash/display/display_configuration_controller.h"
18 #include "ash/display/screen_orientation_controller_chromeos.h" 18 #include "ash/display/screen_orientation_controller_chromeos.h"
19 #include "ash/public/cpp/shelf_item.h" 19 #include "ash/public/cpp/shelf_item.h"
20 #include "ash/public/cpp/shelf_item_delegate.h" 20 #include "ash/public/cpp/shelf_item_delegate.h"
21 #include "ash/shelf/shelf_application_menu_model.h" 21 #include "ash/shelf/shelf_application_menu_model.h"
22 #include "ash/shelf/shelf_constants.h" 22 #include "ash/shelf/shelf_constants.h"
23 #include "ash/shelf/shelf_controller.h" 23 #include "ash/shelf/shelf_controller.h"
24 #include "ash/shelf/shelf_model.h" 24 #include "ash/shelf/shelf_model.h"
25 #include "ash/shelf/shelf_model_observer.h" 25 #include "ash/shelf/shelf_model_observer.h"
26 #include "ash/shell.h" 26 #include "ash/shell.h"
27 #include "ash/test/ash_test_helper.h" 27 #include "ash/test/ash_test_helper.h"
28 #include "ash/test/shell_test_api.h" 28 #include "ash/test/shell_test_api.h"
29 #include "ash/test/test_shell_delegate.h" 29 #include "ash/test/test_shell_delegate.h"
30 #include "ash/wm/maximize_mode/maximize_mode_controller.h" 30 #include "ash/wm/tablet_mode/tablet_mode_controller.h"
31 #include "ash/wm/window_util.h" 31 #include "ash/wm/window_util.h"
32 #include "base/command_line.h" 32 #include "base/command_line.h"
33 #include "base/compiler_specific.h" 33 #include "base/compiler_specific.h"
34 #include "base/files/file_path.h" 34 #include "base/files/file_path.h"
35 #include "base/json/json_string_value_serializer.h" 35 #include "base/json/json_string_value_serializer.h"
36 #include "base/location.h" 36 #include "base/location.h"
37 #include "base/macros.h" 37 #include "base/macros.h"
38 #include "base/memory/ptr_util.h" 38 #include "base/memory/ptr_util.h"
39 #include "base/run_loop.h" 39 #include "base/run_loop.h"
40 #include "base/single_thread_task_runner.h" 40 #include "base/single_thread_task_runner.h"
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 } 953 }
954 954
955 // TODO(victorhsieh): Add test coverage for when ARC is started regardless 955 // TODO(victorhsieh): Add test coverage for when ARC is started regardless
956 // Play Store opt-in status, and the followed opt-in and opt-out. 956 // Play Store opt-in status, and the followed opt-in and opt-out.
957 void EnablePlayStore(bool enabled) { 957 void EnablePlayStore(bool enabled) {
958 arc::SetArcPlayStoreEnabledForProfile(profile(), enabled); 958 arc::SetArcPlayStoreEnabledForProfile(profile(), enabled);
959 base::RunLoop().RunUntilIdle(); 959 base::RunLoop().RunUntilIdle();
960 } 960 }
961 961
962 void EnableTabletMode(bool enable) { 962 void EnableTabletMode(bool enable) {
963 ash::MaximizeModeController* controller = 963 ash::TabletModeController* controller =
964 ash::Shell::Get()->maximize_mode_controller(); 964 ash::Shell::Get()->tablet_mode_controller();
965 controller->EnableMaximizeModeWindowManager(enable); 965 controller->EnableTabletModeWindowManager(enable);
966 } 966 }
967 967
968 void ValidateArcState(bool arc_enabled, 968 void ValidateArcState(bool arc_enabled,
969 bool arc_managed, 969 bool arc_managed,
970 arc::ArcSessionManager::State state, 970 arc::ArcSessionManager::State state,
971 const std::string& pin_status) { 971 const std::string& pin_status) {
972 EXPECT_EQ(arc_enabled, arc::IsArcPlayStoreEnabledForProfile(profile())); 972 EXPECT_EQ(arc_enabled, arc::IsArcPlayStoreEnabledForProfile(profile()));
973 EXPECT_EQ(arc_managed, 973 EXPECT_EQ(arc_managed,
974 arc::IsArcPlayStoreEnabledPreferenceManagedForProfile(profile())); 974 arc::IsArcPlayStoreEnabledPreferenceManagedForProfile(profile()));
975 EXPECT_EQ(state, arc_test_.arc_session_manager()->state()); 975 EXPECT_EQ(state, arc_test_.arc_session_manager()->state());
(...skipping 3309 matching lines...) Expand 10 before | Expand all | Expand 10 after
4285 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, 4285 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
4286 shelf_controller->auto_hide()); 4286 shelf_controller->auto_hide());
4287 EXPECT_EQ(2u, shelf_controller->auto_hide_change_count()); 4287 EXPECT_EQ(2u, shelf_controller->auto_hide_change_count());
4288 4288
4289 PrefService* prefs = profile()->GetTestingPrefService(); 4289 PrefService* prefs = profile()->GetTestingPrefService();
4290 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignmentLocal)); 4290 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignmentLocal));
4291 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignment)); 4291 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignment));
4292 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehaviorLocal)); 4292 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehaviorLocal));
4293 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehavior)); 4293 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehavior));
4294 } 4294 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698