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

Unified Diff: ash/accelerators/accelerator_interactive_uitest_chromeos.cc

Issue 2576913002: Use mojo app list interfaces for mash and classic ash. (Closed)
Patch Set: Sync and rebase Created 3 years, 11 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 | « ash/accelerators/accelerator_controller_unittest.cc ('k') | ash/app_list/app_list_presenter_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_interactive_uitest_chromeos.cc
diff --git a/ash/accelerators/accelerator_interactive_uitest_chromeos.cc b/ash/accelerators/accelerator_interactive_uitest_chromeos.cc
index 7663fc47f871d5564a8ed9e78d1f24c66c697c6b..69755878e1647c2a25d64a9b1c32993a56993afb 100644
--- a/ash/accelerators/accelerator_interactive_uitest_chromeos.cc
+++ b/ash/accelerators/accelerator_interactive_uitest_chromeos.cc
@@ -18,6 +18,9 @@
#include "base/run_loop.h"
#include "base/test/user_action_tester.cc"
#include "chromeos/network/network_handler.h"
+#include "mojo/edk/embedder/embedder.h"
+#include "ui/app_list/presenter/app_list.h"
+#include "ui/app_list/presenter/test/test_app_list_presenter.h"
#include "ui/base/test/ui_controls.h"
namespace ash {
@@ -195,11 +198,18 @@ TEST_F(AcceleratorInteractiveUITest, MAYBE_ChromeOsAccelerators) {
// Tests the app list accelerator.
TEST_F(AcceleratorInteractiveUITest, MAYBE_ToggleAppList) {
- EXPECT_FALSE(WmShell::Get()->GetAppListTargetVisibility());
+ mojo::edk::Init();
+ app_list::test::TestAppListPresenter test_app_list_presenter;
+ WmShell::Get()->app_list()->SetAppListPresenter(
+ test_app_list_presenter.CreateInterfacePtrAndBind());
+
+ EXPECT_EQ(0u, test_app_list_presenter.toggle_count());
SendKeyPressSync(ui::VKEY_LWIN, false, false, false);
- EXPECT_TRUE(WmShell::Get()->GetAppListTargetVisibility());
+ RunAllPendingInMessageLoop();
+ EXPECT_EQ(1u, test_app_list_presenter.toggle_count());
SendKeyPressSync(ui::VKEY_LWIN, false, false, false);
- EXPECT_FALSE(WmShell::Get()->GetAppListTargetVisibility());
+ RunAllPendingInMessageLoop();
+ EXPECT_EQ(2u, test_app_list_presenter.toggle_count());
}
} // namespace test
« no previous file with comments | « ash/accelerators/accelerator_controller_unittest.cc ('k') | ash/app_list/app_list_presenter_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698