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

Side by Side Diff: chrome/browser/sync/test/integration/sync_app_list_helper.h

Issue 1850253002: Revert of [Sync] Eliminate verifier profile from sync_integration_tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 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 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_LIST_HELPER_H_ 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_LIST_HELPER_H_
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_LIST_HELPER_H_ 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_LIST_HELPER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 11 matching lines...) Expand all
22 22
23 class SyncAppListHelper { 23 class SyncAppListHelper {
24 public: 24 public:
25 // Singleton implementation. 25 // Singleton implementation.
26 static SyncAppListHelper* GetInstance(); 26 static SyncAppListHelper* GetInstance();
27 27
28 // Initializes the profiles in |test| and registers them with 28 // Initializes the profiles in |test| and registers them with
29 // internal data structures. 29 // internal data structures.
30 void SetupIfNecessary(SyncTest* test); 30 void SetupIfNecessary(SyncTest* test);
31 31
32 // Returns true iff all existing profiles have the same app list entries. 32 // Returns true iff all existing profiles have the same app list entries
33 bool AllProfilesHaveSameAppList(); 33 // as the verifier.
34 bool AllProfilesHaveSameAppListAsVerifier();
34 35
35 // Moves an app in |profile|. 36 // Moves an app in |profile|.
36 void MoveApp(Profile* profile, size_t from, size_t to); 37 void MoveApp(Profile* profile, size_t from, size_t to);
37 38
38 // Moves an app in |profile| to |folder_id|. 39 // Moves an app in |profile| to |folder_id|.
39 void MoveAppToFolder(Profile* profile, 40 void MoveAppToFolder(Profile* profile,
40 size_t index, 41 size_t index,
41 const std::string& folder_id); 42 const std::string& folder_id);
42 43
43 // Moves an app in |profile| from |folder_id| to the top level list of apps. 44 // Moves an app in |profile| from |folder_id| to the top level list of apps.
44 void MoveAppFromFolder(Profile* profile, 45 void MoveAppFromFolder(Profile* profile,
45 size_t index_in_folder, 46 size_t index_in_folder,
46 const std::string& folder_id); 47 const std::string& folder_id);
47 48
49 // Copies ordinals for item matching |id| from |profile1| to test_->verifier.
50 void CopyOrdinalsToVerifier(Profile* profile1, const std::string& id);
51
48 // Helper function for debugging, used to log the app lists on test failures. 52 // Helper function for debugging, used to log the app lists on test failures.
49 void PrintAppList(Profile* profile); 53 void PrintAppList(Profile* profile);
50 54
51 private: 55 private:
52 friend struct base::DefaultSingletonTraits<SyncAppListHelper>; 56 friend struct base::DefaultSingletonTraits<SyncAppListHelper>;
53 57
54 SyncAppListHelper(); 58 SyncAppListHelper();
55 ~SyncAppListHelper(); 59 ~SyncAppListHelper();
56 60
57 // Returns true iff |profile1| has the same app list as |profile2| 61 // Returns true iff |profile| has the same app list as |test_|->verifier()
58 // and the app list entries all have the same state. 62 // and the app list entries all have the same state.
59 bool AppListMatch(Profile* profile1, Profile* profile2); 63 bool AppListMatchesVerifier(Profile* profile);
60 64
61 // Helper function for debugging, logs info for an item, including the 65 // Helper function for debugging, logs info for an item, including the
62 // contents of any folder items. 66 // contents of any folder items.
63 void PrintItem(Profile* profile, 67 void PrintItem(Profile* profile,
64 app_list::AppListItem* item, 68 app_list::AppListItem* item,
65 const std::string& label); 69 const std::string& label);
66 70
67 SyncTest* test_; 71 SyncTest* test_;
68 bool setup_completed_; 72 bool setup_completed_;
69 73
70 DISALLOW_COPY_AND_ASSIGN(SyncAppListHelper); 74 DISALLOW_COPY_AND_ASSIGN(SyncAppListHelper);
71 }; 75 };
72 76
73 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_LIST_HELPER_H_ 77 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_LIST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698