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

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

Issue 2856353002: Fix DefaultApps unit test (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
(...skipping 4065 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698