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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc

Issue 2090133003: Moved methods that don't rely on internal state out of ChromeLauncherController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed usage in unittests Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
index 28cebca750e5c1d3c9f793439b97878df7842e94..fe98a49708684d5fafe1d0ddc30c6a64d2fe7581 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
@@ -281,7 +281,8 @@ class TestV2AppLauncherItemController : public LauncherItemController {
}
bool IsDraggable() override { return false; }
bool CanPin() const override {
- return launcher_controller()->GetPinnable(app_id()) ==
+ return chrome::util::GetPinnable(launcher_controller()->GetProfile(),
+ app_id()) ==
AppListControllerDelegate::PIN_EDITABLE;
}
bool ShouldShowTooltip() override { return false; }
@@ -1310,13 +1311,17 @@ TEST_F(ChromeLauncherControllerImplTest, MergePolicyAndUserPrefPinnedApps) {
// Check user can manually pin or unpin these apps
EXPECT_EQ(AppListControllerDelegate::PIN_EDITABLE,
- launcher_controller_->GetPinnable(extension1_->id()));
+ chrome::util::GetPinnable(launcher_controller->Getprofile(),
+ extension1_->id()));
EXPECT_EQ(AppListControllerDelegate::PIN_FIXED,
- launcher_controller_->GetPinnable(extension2_->id()));
+ chrome::util::GetPinnable(launcher_controller->Getprofile(),
+ extension1_->id()));
EXPECT_EQ(AppListControllerDelegate::PIN_EDITABLE,
- launcher_controller_->GetPinnable(extension3_->id()));
+ chrome::util::GetPinnable(launcher_controller->Getprofile(),
+ extension1_->id()));
EXPECT_EQ(AppListControllerDelegate::PIN_FIXED,
- launcher_controller_->GetPinnable(extension4_->id()));
+ chrome::util::GetPinnable(launcher_controller->Getprofile(),
+ extension1_->id()));
// Check the order of shelf pinned apps
EXPECT_EQ("AppList, App2, App4, App1, Chrome, App3", GetPinnedAppStatus());
@@ -3354,5 +3359,6 @@ TEST_F(ChromeLauncherControllerImplTest, ArcAppPinPolicy) {
EXPECT_TRUE(launcher_controller_->IsAppPinned(app_id));
EXPECT_EQ(AppListControllerDelegate::PIN_FIXED,
- launcher_controller_->GetPinnable(app_id));
+ chrome::util::GetPinnable(launcher_controller->Getprofile(),
+ extension1_->id()));
}

Powered by Google App Engine
This is Rietveld 408576698