OLD | NEW |
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 29 matching lines...) Expand all Loading... |
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 // Public methods to modify AppInstance for unit_tests. | 46 // Public methods to modify AppInstance for unit_tests. |
47 void StopArcInstance(); | 47 void StopArcInstance(); |
48 void RestartArcInstance(); | 48 void RestartArcInstance(); |
49 | 49 |
| 50 static void Init(bool is_persistent_arc); |
50 static std::string GetAppId(const arc::mojom::AppInfo& app_info); | 51 static std::string GetAppId(const arc::mojom::AppInfo& app_info); |
51 static std::string GetAppId(const arc::mojom::ShortcutInfo& shortcut); | 52 static std::string GetAppId(const arc::mojom::ShortcutInfo& shortcut); |
52 | 53 |
53 const std::vector<arc::mojom::ArcPackageInfo>& fake_packages() const { | 54 const std::vector<arc::mojom::ArcPackageInfo>& fake_packages() const { |
54 return fake_packages_; | 55 return fake_packages_; |
55 } | 56 } |
56 | 57 |
57 void AddPackage(const arc::mojom::ArcPackageInfo& package); | 58 void AddPackage(const arc::mojom::ArcPackageInfo& package); |
58 | 59 |
59 void RemovePackage(const arc::mojom::ArcPackageInfo& package); | 60 void RemovePackage(const arc::mojom::ArcPackageInfo& package); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 std::vector<arc::mojom::AppInfo> fake_default_apps_; | 104 std::vector<arc::mojom::AppInfo> fake_default_apps_; |
104 std::vector<arc::mojom::ArcPackageInfo> fake_packages_; | 105 std::vector<arc::mojom::ArcPackageInfo> fake_packages_; |
105 std::vector<arc::mojom::ShortcutInfo> fake_shortcuts_; | 106 std::vector<arc::mojom::ShortcutInfo> fake_shortcuts_; |
106 | 107 |
107 bool dbus_thread_manager_initialized_ = false; | 108 bool dbus_thread_manager_initialized_ = false; |
108 | 109 |
109 DISALLOW_COPY_AND_ASSIGN(ArcAppTest); | 110 DISALLOW_COPY_AND_ASSIGN(ArcAppTest); |
110 }; | 111 }; |
111 | 112 |
112 #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_TEST_H_ | 113 #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_TEST_H_ |
OLD | NEW |