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

Side by Side Diff: chrome/browser/ui/app_list/arc/arc_app_test.cc

Issue 2228663003: arc: Add package app list updated event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/app_list/arc/arc_app_test.h" 5 #include "chrome/browser/ui/app_list/arc/arc_app_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" 9 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h"
10 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" 10 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h"
11 #include "chrome/browser/chromeos/profiles/profile_helper.h" 11 #include "chrome/browser/chromeos/profiles/profile_helper.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" 13 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
14 #include "chromeos/chromeos_switches.h" 14 #include "chromeos/chromeos_switches.h"
15 #include "components/arc/arc_bridge_service.h" 15 #include "components/arc/arc_bridge_service.h"
16 #include "components/arc/test/fake_app_instance.h" 16 #include "components/arc/test/fake_app_instance.h"
17 #include "components/arc/test/fake_arc_bridge_service.h" 17 #include "components/arc/test/fake_arc_bridge_service.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 19
20 namespace { 20 namespace {
21 21
22 constexpr char kPackageName1[] = "fakepackagename1"; 22 constexpr char kPackageName1[] = "fake.package.name1";
23 constexpr char kPackageName2[] = "fakepackagename2"; 23 constexpr char kPackageName2[] = "fake.package.name2";
24 constexpr char kPackageName3[] = "fakepackagename3"; 24 constexpr char kPackageName3[] = "fake.package.name3";
25 } 25 }
26 26
27 // static 27 // static
28 std::string ArcAppTest::GetAppId(const arc::mojom::AppInfo& app_info) { 28 std::string ArcAppTest::GetAppId(const arc::mojom::AppInfo& app_info) {
29 return ArcAppListPrefs::GetAppId(app_info.package_name, app_info.activity); 29 return ArcAppListPrefs::GetAppId(app_info.package_name, app_info.activity);
30 } 30 }
31 31
32 std::string ArcAppTest::GetAppId(const arc::mojom::ShortcutInfo& shortcut) { 32 std::string ArcAppTest::GetAppId(const arc::mojom::ShortcutInfo& shortcut) {
33 return ArcAppListPrefs::GetAppId(shortcut.package_name, shortcut.intent_uri); 33 return ArcAppListPrefs::GetAppId(shortcut.package_name, shortcut.intent_uri);
34 } 34 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 } 162 }
163 163
164 bool ArcAppTest::FindPackage(const arc::mojom::ArcPackageInfo& package) { 164 bool ArcAppTest::FindPackage(const arc::mojom::ArcPackageInfo& package) {
165 for (auto fake_package : fake_packages_) { 165 for (auto fake_package : fake_packages_) {
166 if (package.package_name == fake_package.package_name) 166 if (package.package_name == fake_package.package_name)
167 return true; 167 return true;
168 } 168 }
169 return false; 169 return false;
170 } 170 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc ('k') | chrome/browser/ui/app_list/arc/arc_app_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698