Index: ui/app_list/test/app_list_test_model.cc |
diff --git a/ui/app_list/test/app_list_test_model.cc b/ui/app_list/test/app_list_test_model.cc |
index 527383e199b4464ebda950dd1a6a6626c89d55c3..66d2a6924ea83f5d173d14645dbfa928425ff185 100644 |
--- a/ui/app_list/test/app_list_test_model.cc |
+++ b/ui/app_list/test/app_list_test_model.cc |
@@ -69,7 +69,7 @@ void AppListTestModel::PopulateApps(int n) { |
CreateAndAddItem(GetItemName(start_index + i)); |
} |
-void AppListTestModel::CreateAndPopulateFolderWithApps(int n) { |
+AppListFolderItem* AppListTestModel::CreateAndPopulateFolderWithApps(int n) { |
DCHECK_GT(n, 1); |
int start_index = static_cast<int>(top_level_item_list()->item_count()); |
AppListTestItem* item = CreateAndAddItem(GetItemName(start_index)); |
@@ -78,6 +78,16 @@ void AppListTestModel::CreateAndPopulateFolderWithApps(int n) { |
AppListTestItem* new_item = CreateAndAddItem(GetItemName(start_index + i)); |
merged_item_id = AppListModel::MergeItems(merged_item_id, new_item->id()); |
} |
+ AppListItem* merged_item = FindItem(merged_item_id); |
+ DCHECK(merged_item->GetItemType() == AppListFolderItem::kItemType); |
+ return static_cast<AppListFolderItem*>(merged_item); |
+} |
+ |
+AppListFolderItem* AppListTestModel::CreateAndAddOemFolder( |
+ const std::string& id) { |
+ AppListFolderItem* folder = |
+ new AppListFolderItem(id, AppListFolderItem::FOLDER_TYPE_OEM); |
+ return static_cast<AppListFolderItem*>(AddItem(folder)); |
} |
void AppListTestModel::PopulateAppWithId(int id) { |