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

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

Issue 2106663004: arc: Initial implemetation of Chrome sync for Arc packages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. More refactor. Fix unit_test related to refactor. Created 4 years, 5 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 #ifndef CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_TEST_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_TEST_H_
6 #define CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_TEST_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_TEST_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 25 matching lines...) Expand all
36 36
37 // Helper class to initialize arc bridge to work with arc apps in unit tests. 37 // Helper class to initialize arc bridge to work with arc apps in unit tests.
38 class ArcAppTest { 38 class ArcAppTest {
39 public: 39 public:
40 ArcAppTest(); 40 ArcAppTest();
41 virtual ~ArcAppTest(); 41 virtual ~ArcAppTest();
42 42
43 void SetUp(Profile* profile); 43 void SetUp(Profile* profile);
44 void TearDown(); 44 void TearDown();
45 45
46 // AppInstance is destoryed after bridge stops and InstanceHolder::
47 // CloseChannl(). Reset AppInstance to continue unit_tests.
Luis Héctor Chávez 2016/07/20 00:01:15 nit: CloseChannel()
lgcheng 2016/07/20 01:23:58 Done.
48 void ResetAppInstance();
49
46 static std::string GetAppId(const arc::mojom::AppInfo& app_info); 50 static std::string GetAppId(const arc::mojom::AppInfo& app_info);
47 static std::string GetAppId(const arc::mojom::ShortcutInfo& shortcut); 51 static std::string GetAppId(const arc::mojom::ShortcutInfo& shortcut);
48 52
49 const std::vector<arc::mojom::ArcPackageInfo>& fake_packages() const { 53 const std::vector<arc::mojom::ArcPackageInfo>& fake_packages() const {
50 return fake_packages_; 54 return fake_packages_;
51 } 55 }
52 56
53 void AddPackage(const arc::mojom::ArcPackageInfo& package); 57 void AddPackage(const arc::mojom::ArcPackageInfo& package);
54 58
55 void RemovePackage(const arc::mojom::ArcPackageInfo& package); 59 void RemovePackage(const arc::mojom::ArcPackageInfo& package);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 std::unique_ptr<arc::ArcAuthService> auth_service_; 91 std::unique_ptr<arc::ArcAuthService> auth_service_;
88 std::unique_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_; 92 std::unique_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_;
89 std::vector<arc::mojom::AppInfo> fake_apps_; 93 std::vector<arc::mojom::AppInfo> fake_apps_;
90 std::vector<arc::mojom::ArcPackageInfo> fake_packages_; 94 std::vector<arc::mojom::ArcPackageInfo> fake_packages_;
91 std::vector<arc::mojom::ShortcutInfo> fake_shortcuts_; 95 std::vector<arc::mojom::ShortcutInfo> fake_shortcuts_;
92 96
93 DISALLOW_COPY_AND_ASSIGN(ArcAppTest); 97 DISALLOW_COPY_AND_ASSIGN(ArcAppTest);
94 }; 98 };
95 99
96 #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_TEST_H_ 100 #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698