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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc

Issue 2329513002: [Merge-M53] arc: Make Play Store item persistent in app list. (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_default_app_list.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 appinfo.package_name = package_name; 886 appinfo.package_name = package_name;
887 appinfo.activity = activity; 887 appinfo.activity = activity;
888 appinfo.orientation_lock = lock; 888 appinfo.orientation_lock = lock;
889 return appinfo; 889 return appinfo;
890 } 890 }
891 891
892 std::string AddArcAppAndShortcut(const arc::mojom::AppInfo& app_info) { 892 std::string AddArcAppAndShortcut(const arc::mojom::AppInfo& app_info) {
893 ArcAppListPrefs* const prefs = arc_test_.arc_app_list_prefs(); 893 ArcAppListPrefs* const prefs = arc_test_.arc_app_list_prefs();
894 // Adding app to the prefs, and check that the app is accessible by id. 894 // Adding app to the prefs, and check that the app is accessible by id.
895 prefs->AddAppAndShortcut( 895 prefs->AddAppAndShortcut(
896 app_info.name, app_info.package_name, app_info.activity, 896 true /* app_ready */, app_info.name, app_info.package_name,
897 std::string() /* intent_uri */, std::string() /* icon_resource_id */, 897 app_info.activity, std::string() /* intent_uri */,
898 false /* sticky */, true /* notifications_enabled */, 898 std::string() /* icon_resource_id */, false /* sticky */,
899 false /* shortcut */, true /* launchable */, app_info.orientation_lock); 899 true /* notifications_enabled */, false /* shortcut */,
900 true /* launchable */, app_info.orientation_lock);
900 const std::string app_id = 901 const std::string app_id =
901 ArcAppListPrefs::GetAppId(app_info.package_name, app_info.activity); 902 ArcAppListPrefs::GetAppId(app_info.package_name, app_info.activity);
902 EXPECT_TRUE(prefs->GetApp(app_id)); 903 EXPECT_TRUE(prefs->GetApp(app_id));
903 return app_id; 904 return app_id;
904 } 905 }
905 906
906 void NotifyOnTaskCreated(const arc::mojom::AppInfo& appinfo, 907 void NotifyOnTaskCreated(const arc::mojom::AppInfo& appinfo,
907 int32_t task_id) { 908 int32_t task_id) {
908 ArcAppListPrefs* const prefs = arc_test_.arc_app_list_prefs(); 909 ArcAppListPrefs* const prefs = arc_test_.arc_app_list_prefs();
909 prefs->OnTaskCreated(task_id, appinfo.package_name, appinfo.activity, 910 prefs->OnTaskCreated(task_id, appinfo.package_name, appinfo.activity,
(...skipping 2967 matching lines...) Expand 10 before | Expand all | Expand 10 after
3877 EXPECT_TRUE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id)); 3878 EXPECT_TRUE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id));
3878 3879
3879 std::string window_app_id("org.chromium.arc.1"); 3880 std::string window_app_id("org.chromium.arc.1");
3880 CreateArcWindow(window_app_id); 3881 CreateArcWindow(window_app_id);
3881 arc_test_.app_instance()->SendTaskCreated(1, 3882 arc_test_.app_instance()->SendTaskCreated(1,
3882 arc_test_.fake_default_apps()[0]); 3883 arc_test_.fake_default_apps()[0]);
3883 3884
3884 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(app_id)); 3885 EXPECT_NE(0, launcher_controller_->GetShelfIDForAppID(app_id));
3885 EXPECT_FALSE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id)); 3886 EXPECT_FALSE(launcher_controller_->GetArcDeferredLauncher()->HasApp(app_id));
3886 } 3887 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_default_app_list.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698