| OLD | NEW |
| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // Checks if the bookmark models of all sync profiles match each other. Does | 149 // Checks if the bookmark models of all sync profiles match each other. Does |
| 150 // not compare them with the verifier bookmark model. Returns true if they | 150 // not compare them with the verifier bookmark model. Returns true if they |
| 151 // match. | 151 // match. |
| 152 bool AllModelsMatch() WARN_UNUSED_RESULT; | 152 bool AllModelsMatch() WARN_UNUSED_RESULT; |
| 153 | 153 |
| 154 // Check if the bookmarks models of all sync profiles match each other, using | 154 // Check if the bookmarks models of all sync profiles match each other, using |
| 155 // AllModelsMatch. Returns true if bookmark models match and don't timeout | 155 // AllModelsMatch. Returns true if bookmark models match and don't timeout |
| 156 // while checking. | 156 // while checking. |
| 157 bool AwaitAllModelsMatch() WARN_UNUSED_RESULT; | 157 bool AwaitAllModelsMatch() WARN_UNUSED_RESULT; |
| 158 | 158 |
| 159 // Blocks the caller until the given |profile| contains |expected_count| |
| 160 // bookmarks with |title| or until waiting times out. |
| 161 bool AwaitCountBookmarksWithTitlesMatching(int profile, |
| 162 const std::string& title, |
| 163 int expected_count) |
| 164 WARN_UNUSED_RESULT; |
| 165 |
| 159 // Checks if the bookmark model of profile |profile| contains any instances of | 166 // Checks if the bookmark model of profile |profile| contains any instances of |
| 160 // two bookmarks with the same URL under the same parent folder. Returns true | 167 // two bookmarks with the same URL under the same parent folder. Returns true |
| 161 // if even one instance is found. | 168 // if even one instance is found. |
| 162 bool ContainsDuplicateBookmarks(int profile); | 169 bool ContainsDuplicateBookmarks(int profile); |
| 163 | 170 |
| 164 // Returns whether a node exists with the specified url. | 171 // Returns whether a node exists with the specified url. |
| 165 bool HasNodeWithURL(int profile, const GURL& url); | 172 bool HasNodeWithURL(int profile, const GURL& url); |
| 166 | 173 |
| 167 // 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 |
| 168 // |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. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 209 |
| 203 // Returns a subfolder name identifiable by |i|. | 210 // Returns a subfolder name identifiable by |i|. |
| 204 std::string IndexedSubfolderName(int i); | 211 std::string IndexedSubfolderName(int i); |
| 205 | 212 |
| 206 // Returns a subsubfolder name identifiable by |i|. | 213 // Returns a subsubfolder name identifiable by |i|. |
| 207 std::string IndexedSubsubfolderName(int i); | 214 std::string IndexedSubsubfolderName(int i); |
| 208 | 215 |
| 209 } // namespace bookmarks_helper | 216 } // namespace bookmarks_helper |
| 210 | 217 |
| 211 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_BOOKMARKS_HELPER_H_ | 218 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_BOOKMARKS_HELPER_H_ |
| OLD | NEW |