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

Unified Diff: ui/app_list/test/app_list_test_model.cc

Issue 220393003: Add a unit test for resetting the app list on a reshow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trent_whole_app_list_unit_test
Patch Set: Created 6 years, 9 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: 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 66d2a6924ea83f5d173d14645dbfa928425ff185..2742780eb627916045792472e43864f02b40c76c 100644
--- a/ui/app_list/test/app_list_test_model.cc
+++ b/ui/app_list/test/app_list_test_model.cc
@@ -6,6 +6,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/strings/stringprintf.h"
+#include "ui/gfx/image/image_skia.h"
namespace app_list {
namespace test {
@@ -20,7 +21,12 @@ AppListTestModel::AppListTestItem::AppListTestItem(
AppListTestModel* model)
: AppListItem(id),
model_(model) {
+ SkBitmap bitmap;
tapted 2014/04/01 06:28:27 In my demo code I'm doing ui::ResourceBundle& r
calamity 2014/04/01 08:08:46 Done.
+ const int kBitmapSize = 48;
+ bitmap.setConfig(SkBitmap::kARGB_8888_Config, kBitmapSize, kBitmapSize);
+ SetIcon(gfx::ImageSkia::CreateFrom1xBitmap(bitmap), false);
}
+
AppListTestModel::AppListTestItem::~AppListTestItem() {
}
@@ -54,7 +60,7 @@ AppListItem* AppListTestModel::AddItemToFolder(AppListItem* item,
}
void AppListTestModel::MoveItemToFolder(AppListItem* item,
- const std::string& folder_id) {
+ const std::string& folder_id) {
AppListModel::MoveItemToFolder(item, folder_id);
}
« no previous file with comments | « no previous file | ui/app_list/views/app_list_view_unittest.cc » ('j') | ui/app_list/views/app_list_view_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698