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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc

Issue 2550683002: [Merge to 2924] Reland "Propagate information about how ARC apps are launched" (Closed)
Patch Set: Created 4 years 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: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
index 70c4bafb7f2ad48fe2c7453f84760bfa1a689be8..9e7670f73b0ea07b0f6efa8e30242d69cf49c580 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
@@ -103,6 +103,7 @@
#include "ui/display/display.h"
#include "ui/display/display_switches.h"
#include "ui/display/screen.h"
+#include "ui/events/event_constants.h"
#include "ui/views/widget/widget.h"
using base::ASCIIToUTF16;
@@ -833,7 +834,7 @@ class ChromeLauncherControllerImplTest : public BrowserWithTestWindowTest {
}
// Creates app window and set optional Arc application id.
- views::Widget* CreateArcWindow(std::string& window_app_id) {
+ views::Widget* CreateArcWindow(const std::string& window_app_id) {
views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
params.bounds = gfx::Rect(5, 5, 20, 20);
params.context = GetContext();
@@ -1216,7 +1217,7 @@ class MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerImplTest
};
class ChromeLauncherControllerImplMultiProfileWithArcTest
- : public MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerImplTest {
+ : public MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerImplTest { // NOLINT(whitespace/line_length)
protected:
ChromeLauncherControllerImplMultiProfileWithArcTest() {
auto_start_arc_test_ = true;
@@ -1788,11 +1789,11 @@ TEST_F(ChromeLauncherControllerImplWithArcTest, ArcDeferredLaunch) {
EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(arc_app_id2));
EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(arc_app_id3));
- arc::LaunchApp(profile(), arc_app_id1);
- arc::LaunchApp(profile(), arc_app_id1);
- arc::LaunchApp(profile(), arc_app_id2);
- arc::LaunchApp(profile(), arc_app_id3);
- arc::LaunchApp(profile(), arc_app_id3);
+ arc::LaunchApp(profile(), arc_app_id1, ui::EF_LEFT_MOUSE_BUTTON);
+ arc::LaunchApp(profile(), arc_app_id1, ui::EF_LEFT_MOUSE_BUTTON);
+ arc::LaunchApp(profile(), arc_app_id2, ui::EF_LEFT_MOUSE_BUTTON);
+ arc::LaunchApp(profile(), arc_app_id3, ui::EF_LEFT_MOUSE_BUTTON);
+ arc::LaunchApp(profile(), arc_app_id3, ui::EF_LEFT_MOUSE_BUTTON);
const ash::ShelfID shelf_id_app_1 =
launcher_controller_->GetShelfIDForAppID(arc_app_id1);
@@ -1931,7 +1932,7 @@ TEST_F(ChromeLauncherControllerImplWithArcTest, ArcRunningApp) {
}
// Test race creation/deletion of Arc app.
-// TODO (khmel): Remove after moving everything to wayland protocol.
+// TODO(khmel): Remove after moving everything to wayland protocol.
TEST_F(ChromeLauncherControllerImplWithArcTest, ArcRaceCreateClose) {
InitLauncherController();
@@ -3928,7 +3929,7 @@ TEST_F(ChromeLauncherControllerArcDefaultAppsTest, DefaultApps) {
const std::string app_id =
ArcAppTest::GetAppId(arc_test_.fake_default_apps()[0]);
EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(app_id));
- EXPECT_TRUE(arc::LaunchApp(profile(), app_id));
+ EXPECT_TRUE(arc::LaunchApp(profile(), app_id, ui::EF_LEFT_MOUSE_BUTTON));
EXPECT_TRUE(arc_test_.arc_auth_service()->IsArcEnabled());
EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(app_id));
@@ -3936,7 +3937,7 @@ TEST_F(ChromeLauncherControllerArcDefaultAppsTest, DefaultApps) {
EnableArc(false);
EXPECT_EQ(0, launcher_controller_->GetShelfIDForAppID(app_id));
- EXPECT_TRUE(arc::LaunchApp(profile(), app_id));
+ EXPECT_TRUE(arc::LaunchApp(profile(), app_id, ui::EF_LEFT_MOUSE_BUTTON));
EXPECT_TRUE(arc_test_.arc_auth_service()->IsArcEnabled());
EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(app_id));

Powered by Google App Engine
This is Rietveld 408576698