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

Unified Diff: chrome/browser/sync/test/integration/sync_arc_package_helper.h

Issue 2174753004: arc:Integration test for Arc package Chrome sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@current
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/test/integration/sync_arc_package_helper.h
diff --git a/chrome/browser/sync/test/integration/sync_arc_package_helper.h b/chrome/browser/sync/test/integration/sync_arc_package_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..75732a0f6eefc5cfd1302390467e25a75bf33dc5
--- /dev/null
+++ b/chrome/browser/sync/test/integration/sync_arc_package_helper.h
@@ -0,0 +1,73 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_ARC_PACKAGE_HELPER_H_
+#define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_ARC_PACKAGE_HELPER_H_
+
+#include <map>
+
+#include "base/macros.h"
+#include "base/memory/singleton.h"
+#include "components/arc/common/app.mojom.h"
+
+class Profile;
+class SyncTest;
+
+namespace chromeos {
+class ScopedUserManagerEnabler;
+}
+
+namespace arc {
+
+class ArcBridgeService;
Luis Héctor Chávez 2016/07/25 17:56:24 unused
lgcheng 2016/07/25 20:45:32 Done.
+
+class SyncArcPackageHelper {
+ public:
+ static SyncArcPackageHelper* GetInstance();
+
+ void SetupTest(SyncTest* test);
+
+ void ClearUp();
stevenjb 2016/07/25 16:45:08 nit: CleanUp
lgcheng 2016/07/25 20:45:32 Done.
+
+ void InstallPackageWithIndex(Profile* profile, int id);
Luis Héctor Chávez 2016/07/25 17:56:24 Can these ints be size_t?
lgcheng 2016/07/25 20:45:32 Done.
+
+ void UninstallPackageWithIndex(Profile* profile, int id);
+
+ void ClearPackages(Profile* profile);
+
+ bool AllProfilesHaveSamePackages();
+
+ bool AllProfilesHaveSamePackageDetail();
+
+ void SetupArcService(Profile* profile, const char* id);
+
+ private:
+ friend struct base::DefaultSingletonTraits<SyncArcPackageHelper>;
+
+ SyncArcPackageHelper();
+ ~SyncArcPackageHelper();
+
+ void InstallPackage(Profile* profile,
+ const mojom::ArcPackageInfo& package);
+
+ void UninstallPackage(Profile* profile, const std::string& package_name);
+
+ // Returns true if |profile1| has the same arc packages as |profile2|.
+ bool ArcPackageMatch(Profile* profile1, Profile* profile2);
stevenjb 2016/07/25 16:45:08 ArcPackagesMatch
lgcheng 2016/07/25 20:45:32 Done.
+
+ // Returns true if |profile1| has the same arc packages and detail package
+ // informaton as |profile2|.
+ bool ArcPackageDetailMatch(Profile* profile1, Profile* profile2);
stevenjb 2016/07/25 16:45:08 ArcPackageDetailsMatch
lgcheng 2016/07/25 20:45:32 Done.
+
+ SyncTest* test_;
+ bool setup_completed_;
+
+ std::unique_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_;
+
+ DISALLOW_COPY_AND_ASSIGN(SyncArcPackageHelper);
+};
+
+} // namespace arc
+
+#endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_ARC_PACKAGE_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698