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

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

Issue 772513004: Add new E2E sync multi profiles tests. This should not affect any existing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BOOKMARKS_HELPER_H_ 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_BOOKMARKS_HELPER_H_
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_BOOKMARKS_HELPER_H_ 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_BOOKMARKS_HELPER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 void RemoveAll(int profile); 128 void RemoveAll(int profile);
129 129
130 // Sorts the children of the node |parent| in the bookmark model of profile 130 // Sorts the children of the node |parent| in the bookmark model of profile
131 // |profile|. 131 // |profile|.
132 void SortChildren(int profile, const BookmarkNode* parent); 132 void SortChildren(int profile, const BookmarkNode* parent);
133 133
134 // Reverses the order of the children of the node |parent| in the bookmark 134 // Reverses the order of the children of the node |parent| in the bookmark
135 // model of profile |profile|. 135 // model of profile |profile|.
136 void ReverseChildOrder(int profile, const BookmarkNode* parent); 136 void ReverseChildOrder(int profile, const BookmarkNode* parent);
137 137
138 // Sends sync refresh notification for bookmarks model set of profile |profile|.
139 void NotifyBookmarksSync(int profile);
140
141 // Sends sync refresh notification for bookmarks model set to all profiles.
142 void NotifyBookmarksSyncToAllProfiles();
143
138 // Checks if the bookmark model of profile |profile| matches the verifier 144 // Checks if the bookmark model of profile |profile| matches the verifier
139 // bookmark model. Returns true if they match. 145 // bookmark model. Returns true if they match.
140 bool ModelMatchesVerifier(int profile) WARN_UNUSED_RESULT; 146 bool ModelMatchesVerifier(int profile) WARN_UNUSED_RESULT;
141 147
142 // Checks if the bookmark models of all sync profiles match the verifier 148 // Checks if the bookmark models of all sync profiles match the verifier
143 // bookmark model. Returns true if they match. 149 // bookmark model. Returns true if they match.
144 bool AllModelsMatchVerifier() WARN_UNUSED_RESULT; 150 bool AllModelsMatchVerifier() WARN_UNUSED_RESULT;
145 151
146 // Checks if the bookmark models of |profile_a| and |profile_b| match each 152 // Checks if the bookmark models of |profile_a| and |profile_b| match each
147 // other. Returns true if they match. 153 // other. Returns true if they match.
(...skipping 16 matching lines...) Expand all
164 170
165 // Returns whether a node exists with the specified url. 171 // Returns whether a node exists with the specified url.
166 bool HasNodeWithURL(int profile, const GURL& url); 172 bool HasNodeWithURL(int profile, const GURL& url);
167 173
168 // Gets the node in the bookmark model of profile |profile| that has the url 174 // Gets the node in the bookmark model of profile |profile| that has the url
169 // |url|. Note: Only one instance of |url| is assumed to be present. 175 // |url|. Note: Only one instance of |url| is assumed to be present.
170 const BookmarkNode* GetUniqueNodeByURL( 176 const BookmarkNode* GetUniqueNodeByURL(
171 int profile, 177 int profile,
172 const GURL& url) WARN_UNUSED_RESULT; 178 const GURL& url) WARN_UNUSED_RESULT;
173 179
180 // Returns the number of bookmarks in bookmark model of profile |profile|.
181 int CountAllBookmarks(int profile) WARN_UNUSED_RESULT;
182
174 // Returns the number of bookmarks in bookmark model of profile |profile| 183 // Returns the number of bookmarks in bookmark model of profile |profile|
175 // whose titles match the string |title|. 184 // whose titles match the string |title|.
176 int CountBookmarksWithTitlesMatching( 185 int CountBookmarksWithTitlesMatching(
177 int profile, 186 int profile,
178 const std::string& title) WARN_UNUSED_RESULT; 187 const std::string& title) WARN_UNUSED_RESULT;
179 188
180 // Returns the number of bookmark folders in the bookmark model of profile 189 // Returns the number of bookmark folders in the bookmark model of profile
181 // |profile| whose titles contain the query string |title|. 190 // |profile| whose titles contain the query string |title|.
182 int CountFoldersWithTitlesMatching( 191 int CountFoldersWithTitlesMatching(
183 int profile, 192 int profile,
(...skipping 17 matching lines...) Expand all
201 210
202 // Returns a subfolder name identifiable by |i|. 211 // Returns a subfolder name identifiable by |i|.
203 std::string IndexedSubfolderName(int i); 212 std::string IndexedSubfolderName(int i);
204 213
205 // Returns a subsubfolder name identifiable by |i|. 214 // Returns a subsubfolder name identifiable by |i|.
206 std::string IndexedSubsubfolderName(int i); 215 std::string IndexedSubsubfolderName(int i);
207 216
208 } // namespace bookmarks_helper 217 } // namespace bookmarks_helper
209 218
210 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_BOOKMARKS_HELPER_H_ 219 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_BOOKMARKS_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698