| OLD | NEW |
| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 size_t index_in_folder, | 44 size_t index_in_folder, |
| 45 const std::string& folder_id); | 45 const std::string& folder_id); |
| 46 | 46 |
| 47 // Copies ordinals for item matching |id| from |profile1| to test_->verifier. | 47 // Copies ordinals for item matching |id| from |profile1| to test_->verifier. |
| 48 void CopyOrdinalsToVerifier(Profile* profile1, const std::string& id); | 48 void CopyOrdinalsToVerifier(Profile* profile1, const std::string& id); |
| 49 | 49 |
| 50 // Helper function for debugging, used to log the app lists on test failures. | 50 // Helper function for debugging, used to log the app lists on test failures. |
| 51 void PrintAppList(Profile* profile); | 51 void PrintAppList(Profile* profile); |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 friend struct DefaultSingletonTraits<SyncAppListHelper>; | 54 friend struct base::DefaultSingletonTraits<SyncAppListHelper>; |
| 55 | 55 |
| 56 SyncAppListHelper(); | 56 SyncAppListHelper(); |
| 57 ~SyncAppListHelper(); | 57 ~SyncAppListHelper(); |
| 58 | 58 |
| 59 // Returns true iff |profile| has the same app list as |test_|->verifier() | 59 // Returns true iff |profile| has the same app list as |test_|->verifier() |
| 60 // and the app list entries all have the same state. | 60 // and the app list entries all have the same state. |
| 61 bool AppListMatchesVerifier(Profile* profile); | 61 bool AppListMatchesVerifier(Profile* profile); |
| 62 | 62 |
| 63 // Helper function for debugging, logs info for an item, including the | 63 // Helper function for debugging, logs info for an item, including the |
| 64 // contents of any folder items. | 64 // contents of any folder items. |
| 65 void PrintItem(Profile* profile, | 65 void PrintItem(Profile* profile, |
| 66 app_list::AppListItem* item, | 66 app_list::AppListItem* item, |
| 67 const std::string& label); | 67 const std::string& label); |
| 68 | 68 |
| 69 SyncTest* test_; | 69 SyncTest* test_; |
| 70 bool setup_completed_; | 70 bool setup_completed_; |
| 71 | 71 |
| 72 DISALLOW_COPY_AND_ASSIGN(SyncAppListHelper); | 72 DISALLOW_COPY_AND_ASSIGN(SyncAppListHelper); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_LIST_HELPER_H_ | 75 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_LIST_HELPER_H_ |
| OLD | NEW |