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

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: Changed to profile_ 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 614901c67c5d5987bf01d5f3ed7a5286f687b40f..14996df8441a835007f61627e0dc3ba7b019d508 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
@@ -49,6 +49,7 @@
#include "chrome/browser/ui/ash/chrome_launcher_prefs.h"
#include "chrome/browser/ui/ash/launcher/app_window_launcher_controller.h"
#include "chrome/browser/ui/ash/launcher/browser_status_monitor.h"
+#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h"
#include "chrome/browser/ui/ash/launcher/extension_app_window_launcher_item_controller.h"
#include "chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.h"
#include "chrome/browser/ui/ash/launcher/launcher_controller_helper.h"
@@ -282,7 +283,7 @@ class TestV2AppLauncherItemController : public LauncherItemController {
}
bool IsDraggable() override { return false; }
bool CanPin() const override {
- return launcher_controller()->GetPinnable(app_id()) ==
+ return GetPinnableForAppID(app_id(), launcher_controller()->GetProfile()) ==
AppListControllerDelegate::PIN_EDITABLE;
}
bool ShouldShowTooltip() override { return false; }
@@ -1331,13 +1332,17 @@ TEST_F(ChromeLauncherControllerImplTest, MergePolicyAndUserPrefPinnedApps) {
// Check user can manually pin or unpin these apps
EXPECT_EQ(AppListControllerDelegate::PIN_EDITABLE,
- launcher_controller_->GetPinnable(extension1_->id()));
+ GetPinnableForAppID(extension1_->id(),
+ launcher_controller_->GetProfile()));
msw 2016/06/27 18:50:26 nit: use profile() (or cache this for the 4 uses h
EXPECT_EQ(AppListControllerDelegate::PIN_FIXED,
- launcher_controller_->GetPinnable(extension2_->id()));
+ GetPinnableForAppID(extension2_->id(),
+ launcher_controller_->GetProfile()));
EXPECT_EQ(AppListControllerDelegate::PIN_EDITABLE,
- launcher_controller_->GetPinnable(extension3_->id()));
+ GetPinnableForAppID(extension3_->id(),
+ launcher_controller_->GetProfile()));
EXPECT_EQ(AppListControllerDelegate::PIN_FIXED,
- launcher_controller_->GetPinnable(extension4_->id()));
+ GetPinnableForAppID(extension4_->id(),
+ launcher_controller_->GetProfile()));
// Check the order of shelf pinned apps
EXPECT_EQ("AppList, App2, App4, App1, Chrome, App3", GetPinnedAppStatus());
@@ -3375,7 +3380,7 @@ TEST_F(ChromeLauncherControllerImplTest, ArcAppPinPolicy) {
EXPECT_TRUE(launcher_controller_->IsAppPinned(app_id));
EXPECT_EQ(AppListControllerDelegate::PIN_FIXED,
- launcher_controller_->GetPinnable(app_id));
+ GetPinnableForAppID(app_id, launcher_controller_->GetProfile()));
msw 2016/06/27 18:50:26 nit: use profile().
}
TEST_F(ChromeLauncherControllerImplTest, ArcManaged) {

Powered by Google App Engine
This is Rietveld 408576698