| OLD | NEW |
| 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> |
| (...skipping 4065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4076 display::Screen::GetScreen()->GetPrimaryDisplay().rotation()); | 4076 display::Screen::GetScreen()->GetPrimaryDisplay().rotation()); |
| 4077 | 4077 |
| 4078 // Manually unlock first. | 4078 // Manually unlock first. |
| 4079 NotifyOnTaskOrientationLockRequested(task_id_none_, OrientationLock::NONE); | 4079 NotifyOnTaskOrientationLockRequested(task_id_none_, OrientationLock::NONE); |
| 4080 EXPECT_FALSE(controller->rotation_locked()); | 4080 EXPECT_FALSE(controller->rotation_locked()); |
| 4081 } | 4081 } |
| 4082 | 4082 |
| 4083 TEST_P(ChromeLauncherControllerArcDefaultAppsTest, DefaultApps) { | 4083 TEST_P(ChromeLauncherControllerArcDefaultAppsTest, DefaultApps) { |
| 4084 arc_test_.SetUp(profile()); | 4084 arc_test_.SetUp(profile()); |
| 4085 InitLauncherController(); | 4085 InitLauncherController(); |
| 4086 // TODO(crbug.com/709297): Fix this workaround to prevent a TearDown crash. | 4086 |
| 4087 std::vector<std::unique_ptr<AppIconLoader>> no_loaders; | 4087 // Prevent safe decoding which requires IPC. |
| 4088 launcher_controller_->SetAppIconLoadersForTest(no_loaders); | 4088 ArcAppIcon::DisableSafeDecodingForTesting(); |
| 4089 | 4089 |
| 4090 ArcAppListPrefs* const prefs = arc_test_.arc_app_list_prefs(); | 4090 ArcAppListPrefs* const prefs = arc_test_.arc_app_list_prefs(); |
| 4091 EnablePlayStore(false); | 4091 EnablePlayStore(false); |
| 4092 EXPECT_FALSE(arc::IsArcPlayStoreEnabledForProfile(profile())); | 4092 EXPECT_FALSE(arc::IsArcPlayStoreEnabledForProfile(profile())); |
| 4093 ASSERT_TRUE(prefs->GetAppIds().size()); | 4093 ASSERT_TRUE(prefs->GetAppIds().size()); |
| 4094 | 4094 |
| 4095 const std::string app_id = | 4095 const std::string app_id = |
| 4096 ArcAppTest::GetAppId(arc_test_.fake_default_apps()[0]); | 4096 ArcAppTest::GetAppId(arc_test_.fake_default_apps()[0]); |
| 4097 EXPECT_EQ(ash::kInvalidShelfID, | 4097 EXPECT_EQ(ash::kInvalidShelfID, |
| 4098 launcher_controller_->GetShelfIDForAppID(app_id)); | 4098 launcher_controller_->GetShelfIDForAppID(app_id)); |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4292 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, | 4292 EXPECT_EQ(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, |
| 4293 shelf_controller->auto_hide()); | 4293 shelf_controller->auto_hide()); |
| 4294 EXPECT_EQ(2u, shelf_controller->auto_hide_change_count()); | 4294 EXPECT_EQ(2u, shelf_controller->auto_hide_change_count()); |
| 4295 | 4295 |
| 4296 PrefService* prefs = profile()->GetTestingPrefService(); | 4296 PrefService* prefs = profile()->GetTestingPrefService(); |
| 4297 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignmentLocal)); | 4297 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignmentLocal)); |
| 4298 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignment)); | 4298 EXPECT_EQ("Left", prefs->GetString(prefs::kShelfAlignment)); |
| 4299 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehaviorLocal)); | 4299 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehaviorLocal)); |
| 4300 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehavior)); | 4300 EXPECT_EQ("Always", prefs->GetString(prefs::kShelfAutoHideBehavior)); |
| 4301 } | 4301 } |
| OLD | NEW |