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

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

Issue 2290603002: Enhance chrome.app.window API for shelf integration with pinning support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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: chrome/browser/ui/ash/launcher/arc_app_launcher_browsertest.cc
diff --git a/chrome/browser/ui/ash/launcher/arc_app_launcher_browsertest.cc b/chrome/browser/ui/ash/launcher/arc_app_launcher_browsertest.cc
index d72acafb895e3a314f79c3c30a5511ac47c68ba0..77bb0847fa52f16e1a912ba1b318340e84a644ef 100644
--- a/chrome/browser/ui/ash/launcher/arc_app_launcher_browsertest.cc
+++ b/chrome/browser/ui/ash/launcher/arc_app_launcher_browsertest.cc
@@ -224,9 +224,9 @@ IN_PROC_BROWSER_TEST_P(ArcAppDeferredLauncherBrowserTest, StartAppDeferred) {
const std::string app_id = GetTestApp1Id();
if (is_pinned()) {
shelf_delegate()->PinAppWithID(app_id);
- EXPECT_TRUE(shelf_delegate()->GetShelfIDForAppID(app_id));
+ EXPECT_TRUE(shelf_delegate()->GetShelfIDForAppID(app_id, app_id));
} else {
- EXPECT_FALSE(shelf_delegate()->GetShelfIDForAppID(app_id));
+ EXPECT_FALSE(shelf_delegate()->GetShelfIDForAppID(app_id, app_id));
}
StopInstance();
@@ -241,13 +241,13 @@ IN_PROC_BROWSER_TEST_P(ArcAppDeferredLauncherBrowserTest, StartAppDeferred) {
ASSERT_TRUE(app_info);
EXPECT_FALSE(app_info->ready);
if (is_pinned())
- EXPECT_TRUE(shelf_delegate()->GetShelfIDForAppID(app_id));
+ EXPECT_TRUE(shelf_delegate()->GetShelfIDForAppID(app_id, app_id));
else
- EXPECT_FALSE(shelf_delegate()->GetShelfIDForAppID(app_id));
+ EXPECT_FALSE(shelf_delegate()->GetShelfIDForAppID(app_id, app_id));
// Launching non-ready Arc app creates item on shelf and spinning animation.
arc::LaunchApp(profile(), app_id);
- EXPECT_TRUE(shelf_delegate()->GetShelfIDForAppID(app_id));
+ EXPECT_TRUE(shelf_delegate()->GetShelfIDForAppID(app_id, app_id));
AppAnimatedWaiter(app_id).Wait();
switch (test_action()) {
@@ -260,9 +260,9 @@ IN_PROC_BROWSER_TEST_P(ArcAppDeferredLauncherBrowserTest, StartAppDeferred) {
->GetActiveTime(app_id)
.is_zero());
if (is_pinned())
- EXPECT_TRUE(shelf_delegate()->GetShelfIDForAppID(app_id));
+ EXPECT_TRUE(shelf_delegate()->GetShelfIDForAppID(app_id, app_id));
else
- EXPECT_FALSE(shelf_delegate()->GetShelfIDForAppID(app_id));
+ EXPECT_FALSE(shelf_delegate()->GetShelfIDForAppID(app_id, app_id));
break;
case TEST_ACTION_EXIT:
// Just exist Chrome.
@@ -272,7 +272,7 @@ IN_PROC_BROWSER_TEST_P(ArcAppDeferredLauncherBrowserTest, StartAppDeferred) {
{
LauncherItemController* controller =
chrome_controller()->GetLauncherItemController(
- shelf_delegate()->GetShelfIDForAppID(app_id));
+ shelf_delegate()->GetShelfIDForAppID(app_id, app_id));
ASSERT_TRUE(controller);
controller->Close();
EXPECT_TRUE(chrome_controller()
@@ -280,9 +280,9 @@ IN_PROC_BROWSER_TEST_P(ArcAppDeferredLauncherBrowserTest, StartAppDeferred) {
->GetActiveTime(app_id)
.is_zero());
if (is_pinned())
- EXPECT_TRUE(shelf_delegate()->GetShelfIDForAppID(app_id));
+ EXPECT_TRUE(shelf_delegate()->GetShelfIDForAppID(app_id, app_id));
else
- EXPECT_FALSE(shelf_delegate()->GetShelfIDForAppID(app_id));
+ EXPECT_FALSE(shelf_delegate()->GetShelfIDForAppID(app_id, app_id));
}
break;
}
@@ -301,25 +301,27 @@ IN_PROC_BROWSER_TEST_F(ArcAppLauncherBrowserTest, PinOnPackageUpdateAndRemove) {
shelf_delegate()->PinAppWithID(app_id1);
shelf_delegate()->PinAppWithID(app_id2);
const ash::ShelfID shelf_id1_before =
- shelf_delegate()->GetShelfIDForAppID(app_id1);
+ shelf_delegate()->GetShelfIDForAppID(app_id1, app_id1);
EXPECT_TRUE(shelf_id1_before);
- EXPECT_TRUE(shelf_delegate()->GetShelfIDForAppID(app_id2));
+ EXPECT_TRUE(shelf_delegate()->GetShelfIDForAppID(app_id2, app_id2));
// Package contains only one app.
SendPackageUpdated(false);
// Second pin should gone.
- EXPECT_EQ(shelf_id1_before, shelf_delegate()->GetShelfIDForAppID(app_id1));
- EXPECT_FALSE(shelf_delegate()->GetShelfIDForAppID(app_id2));
+ EXPECT_EQ(shelf_id1_before,
+ shelf_delegate()->GetShelfIDForAppID(app_id1, app_id1));
+ EXPECT_FALSE(shelf_delegate()->GetShelfIDForAppID(app_id2, app_id2));
// Package contains two apps.
SendPackageUpdated(true);
// Second pin should not appear.
- EXPECT_EQ(shelf_id1_before, shelf_delegate()->GetShelfIDForAppID(app_id1));
- EXPECT_FALSE(shelf_delegate()->GetShelfIDForAppID(app_id2));
+ EXPECT_EQ(shelf_id1_before,
+ shelf_delegate()->GetShelfIDForAppID(app_id1, app_id1));
+ EXPECT_FALSE(shelf_delegate()->GetShelfIDForAppID(app_id2, app_id2));
// Package removed.
SendPackageRemoved();
// No pin is expected.
- EXPECT_FALSE(shelf_delegate()->GetShelfIDForAppID(app_id1));
- EXPECT_FALSE(shelf_delegate()->GetShelfIDForAppID(app_id2));
+ EXPECT_FALSE(shelf_delegate()->GetShelfIDForAppID(app_id1, app_id1));
+ EXPECT_FALSE(shelf_delegate()->GetShelfIDForAppID(app_id2, app_id2));
}

Powered by Google App Engine
This is Rietveld 408576698