OLD | NEW |
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 #ifndef UI_APP_LIST_TEST_APP_LIST_TEST_MODEL_H_ | 5 #ifndef UI_APP_LIST_TEST_APP_LIST_TEST_MODEL_H_ |
6 #define UI_APP_LIST_TEST_APP_LIST_TEST_MODEL_H_ | 6 #define UI_APP_LIST_TEST_APP_LIST_TEST_MODEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ui/app_list/app_list_folder_item.h" | 10 #include "ui/app_list/app_list_folder_item.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 std::string GetItemName(int id); | 46 std::string GetItemName(int id); |
47 | 47 |
48 // Populate the model with |n| items titled "Item #". | 48 // Populate the model with |n| items titled "Item #". |
49 void PopulateApps(int n); | 49 void PopulateApps(int n); |
50 | 50 |
51 // Creates and populate a folder with |n| test apps in it. | 51 // Creates and populate a folder with |n| test apps in it. |
52 AppListFolderItem* CreateAndPopulateFolderWithApps(int n); | 52 AppListFolderItem* CreateAndPopulateFolderWithApps(int n); |
53 | 53 |
54 AppListFolderItem* CreateAndAddOemFolder(const std::string& id); | 54 AppListFolderItem* CreateAndAddOemFolder(const std::string& id); |
55 | 55 |
| 56 AppListFolderItem* CreateSingleItemFolder(const std::string& folder_id, |
| 57 const std::string& item_id); |
| 58 |
56 // Populate the model with an item titled "Item |id|". | 59 // Populate the model with an item titled "Item |id|". |
57 void PopulateAppWithId(int id); | 60 void PopulateAppWithId(int id); |
58 | 61 |
59 // Get a string of all apps in |model| joined with ','. | 62 // Get a string of all apps in |model| joined with ','. |
60 std::string GetModelContent(); | 63 std::string GetModelContent(); |
61 | 64 |
62 // Creates an item with id |id|. Caller owns the result. | 65 // Creates an item with id |id|. Caller owns the result. |
63 AppListTestItem* CreateItem(const std::string& id); | 66 AppListTestItem* CreateItem(const std::string& id); |
64 | 67 |
65 // Creates and adds an item with id |id| to the model. Returns an unowned | 68 // Creates and adds an item with id |id| to the model. Returns an unowned |
(...skipping 12 matching lines...) Expand all Loading... |
78 int activate_count_; | 81 int activate_count_; |
79 AppListItem* last_activated_; | 82 AppListItem* last_activated_; |
80 | 83 |
81 DISALLOW_COPY_AND_ASSIGN(AppListTestModel); | 84 DISALLOW_COPY_AND_ASSIGN(AppListTestModel); |
82 }; | 85 }; |
83 | 86 |
84 } // namespace test | 87 } // namespace test |
85 } // namespace app_list | 88 } // namespace app_list |
86 | 89 |
87 #endif // UI_APP_LIST_TEST_APP_LIST_TEST_MODEL_H_ | 90 #endif // UI_APP_LIST_TEST_APP_LIST_TEST_MODEL_H_ |
OLD | NEW |