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

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

Issue 2601323002: arc: Handle default app not availble case. (Closed)
Patch Set: comments addresssed Created 3 years, 12 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 4fd6dc885acc1d85d518d4928550dd1e006cd9d8..432219531fc34b7f59ba091d13447ef6b29d1d43 100644
--- a/chrome/browser/ui/ash/launcher/arc_app_launcher_browsertest.cc
+++ b/chrome/browser/ui/ash/launcher/arc_app_launcher_browsertest.cc
@@ -227,13 +227,17 @@ class ArcAppLauncherBrowserTest : public ExtensionBrowserTest {
app_host()->OnPackageRemoved(package_name);
}
- void SendInstallationStarted() {
- app_host()->OnInstallationStarted();
+ void SendInstallationStarted(const std::string& package_name) {
+ app_host()->OnInstallationStarted(package_name);
base::RunLoop().RunUntilIdle();
}
- void SendInstallationFinished() {
- app_host()->OnInstallationFinished();
+ void SendInstallationFinished(const std::string& package_name, bool success) {
+ arc::mojom::InstallationResult result;
+ result.package_name = package_name;
+ result.success = success;
+ app_host()->OnInstallationFinished(
+ arc::mojom::InstallationResultPtr(result.Clone()));
base::RunLoop().RunUntilIdle();
}
@@ -417,11 +421,11 @@ IN_PROC_BROWSER_TEST_F(ArcAppLauncherBrowserTest, AppListShown) {
EXPECT_FALSE(app_list_service->IsAppListVisible());
- SendInstallationStarted();
- SendInstallationStarted();
+ SendInstallationStarted(kTestAppPackage);
+ SendInstallationStarted(kTestAppPackage2);
// New package is available. Show app list.
- SendInstallationFinished();
+ SendInstallationFinished(kTestAppPackage, true);
InstallTestApps(kTestAppPackage, false);
SendPackageAdded(kTestAppPackage, true);
EXPECT_TRUE(app_list_service->IsAppListVisible());
@@ -435,14 +439,14 @@ IN_PROC_BROWSER_TEST_F(ArcAppLauncherBrowserTest, AppListShown) {
// Install next package from batch. Next new package is available.
// Don't show app list.
- SendInstallationFinished();
+ SendInstallationFinished(kTestAppPackage2, true);
InstallTestApps(kTestAppPackage2, false);
SendPackageAdded(kTestAppPackage2, true);
EXPECT_FALSE(app_list_service->IsAppListVisible());
// Run next installation batch. App list should be shown again.
- SendInstallationStarted();
- SendInstallationFinished();
+ SendInstallationStarted(kTestAppPackage3);
+ SendInstallationFinished(kTestAppPackage3, true);
InstallTestApps(kTestAppPackage3, false);
SendPackageAdded(kTestAppPackage3, true);
EXPECT_TRUE(app_list_service->IsAppListVisible());

Powered by Google App Engine
This is Rietveld 408576698