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

Unified Diff: chrome/browser/ui/app_list/search/app_search_provider_unittest.cc

Issue 2253253002: [Merge to M53][Chrome OS] Change layout of the launcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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
« no previous file with comments | « chrome/browser/ui/app_list/search/app_search_provider.cc ('k') | ui/app_list/app_list_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/search/app_search_provider_unittest.cc
diff --git a/chrome/browser/ui/app_list/search/app_search_provider_unittest.cc b/chrome/browser/ui/app_list/search/app_search_provider_unittest.cc
index ac28762643bf1f3ee25df36efba5b34025256af9..43eaf9b282245adbbbe209ade64a2bae2ffbb1e4 100644
--- a/chrome/browser/ui/app_list/search/app_search_provider_unittest.cc
+++ b/chrome/browser/ui/app_list/search/app_search_provider_unittest.cc
@@ -244,30 +244,29 @@ TEST_F(AppSearchProviderTest, FetchUnlaunchedRecommendations) {
extensions::ExtensionPrefs* prefs =
extensions::ExtensionPrefs::Get(profile_.get());
- // The order of unlaunched recommendations should be based on the app list
- // order and be sorted below launched items.
- prefs->SetLastLaunchTime(kHostedAppId,
- kTestCurrentTime - base::TimeDelta::FromSeconds(5));
+ // The order of unlaunched recommendations should be based on the install time
+ // order.
+ prefs->SetLastLaunchTime(kHostedAppId, base::Time::Now());
prefs->SetLastLaunchTime(kPackagedApp1Id, base::Time::FromInternalValue(0));
prefs->SetLastLaunchTime(kPackagedApp2Id, base::Time::FromInternalValue(0));
EXPECT_EQ("Hosted App,Packaged App 1,Packaged App 2", RunQuery(""));
- // Switching the app list order should change the query result.
+ // Switching the app list order should not change the query result.
model()->SetItemPosition(
model()->FindItem(kPackagedApp2Id),
model()->FindItem(kPackagedApp1Id)->position().CreateBefore());
- EXPECT_EQ("Hosted App,Packaged App 2,Packaged App 1", RunQuery(""));
+ EXPECT_EQ("Hosted App,Packaged App 1,Packaged App 2", RunQuery(""));
- // Moving an app into a folder deprioritizes it.
+ // Moving an app into a folder should not deprioritize it.
model()->AddItem(std::unique_ptr<AppListFolderItem>(
new AppListFolderItem(kFolderId, AppListFolderItem::FOLDER_TYPE_NORMAL)));
- model()->MoveItemToFolder(model()->FindItem(kPackagedApp2Id), kFolderId);
+ model()->MoveItemToFolder(model()->FindItem(kPackagedApp1Id), kFolderId);
EXPECT_EQ("Hosted App,Packaged App 1,Packaged App 2", RunQuery(""));
// The position of the folder shouldn't matter.
model()->SetItemPosition(
model()->FindItem(kFolderId),
- model()->FindItem(kPackagedApp1Id)->position().CreateBefore());
+ model()->FindItem(kPackagedApp2Id)->position().CreateBefore());
EXPECT_EQ("Hosted App,Packaged App 1,Packaged App 2", RunQuery(""));
}
« no previous file with comments | « chrome/browser/ui/app_list/search/app_search_provider.cc ('k') | ui/app_list/app_list_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698