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

Unified Diff: ui/app_list/views/test/apps_grid_view_test_api.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: fix NULL icon cases for app list folders Created 6 years, 7 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 | « ui/app_list/views/test/apps_grid_view_test_api.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/test/apps_grid_view_test_api.cc
diff --git a/ui/app_list/views/test/apps_grid_view_test_api.cc b/ui/app_list/views/test/apps_grid_view_test_api.cc
index b87ef28a845a577ef4941530b0aee888dde5267b..5e425c384884f014fad91a104c696b8327309c97 100644
--- a/ui/app_list/views/test/apps_grid_view_test_api.cc
+++ b/ui/app_list/views/test/apps_grid_view_test_api.cc
@@ -4,7 +4,9 @@
#include "ui/app_list/views/test/apps_grid_view_test_api.h"
+#include "ui/app_list/views/app_list_item_view.h"
#include "ui/app_list/views/apps_grid_view.h"
+#include "ui/events/event.h"
namespace app_list {
namespace test {
@@ -29,5 +31,10 @@ void AppsGridViewTestApi::SetPageFlipDelay(int page_flip_delay_in_ms) {
view_->page_flip_delay_in_ms_ = page_flip_delay_in_ms;
}
+void AppsGridViewTestApi::PressItemAt(int index) {
+ GetViewAtModelIndex(index)->OnKeyPressed(
+ ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_RETURN, 0, false));
+}
+
} // namespace test
} // namespace app_list
« no previous file with comments | « ui/app_list/views/test/apps_grid_view_test_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698