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

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

Issue 2725813003: reland of [sync] Add Sessions integration tests (Closed)
Patch Set: Switch back to WaitForURLOnServer, make everything a constant Created 3 years, 10 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_test.h
diff --git a/chrome/browser/sync/test/integration/sync_test.h b/chrome/browser/sync/test/integration/sync_test.h
index 818fecd361f33e05cae599675906f49fcea027fd..fb151cfc27da4fc51d7305ebc1588f23aff222cd 100644
--- a/chrome/browser/sync/test/integration/sync_test.h
+++ b/chrome/browser/sync/test/integration/sync_test.h
@@ -126,11 +126,11 @@ class SyncTest : public InProcessBrowserTest {
void SetUpCommandLine(base::CommandLine* cl) override;
// Used to get the number of sync clients used by a test.
- int num_clients() WARN_UNUSED_RESULT { return num_clients_; }
+ int num_clients() { return num_clients_; }
// Returns a pointer to a particular sync profile. Callee owns the object
// and manages its lifetime.
- Profile* GetProfile(int index) WARN_UNUSED_RESULT;
+ Profile* GetProfile(int index);
// Returns a list of all profiles including the verifier if available. Callee
// owns the objects and manages its lifetime.
@@ -138,17 +138,23 @@ class SyncTest : public InProcessBrowserTest {
// Returns a pointer to a particular browser. Callee owns the object
// and manages its lifetime.
- Browser* GetBrowser(int index) WARN_UNUSED_RESULT;
+ Browser* GetBrowser(int index);
+
+ // Adds a new browser belonging to the profile at |profile_index|, and appends
+ // it to the list of browsers. Creates a copy of the Profile pointer in
+ // position |profile_index| and appends it to the list of profiles. This is
+ // done so that the profile associated with the new browser can be found at
+ // the same index as it. Tests typically use browser indexes and profile
+ // indexes interchangeably; this allows them to do so freely.
+ Browser* AddBrowser(int profile_index);
// Returns a pointer to a particular sync client. Callee owns the object
// and manages its lifetime.
- ProfileSyncServiceHarness* GetClient(int index) WARN_UNUSED_RESULT;
+ ProfileSyncServiceHarness* GetClient(int index);
// Returns a reference to the collection of sync clients. Callee owns the
// object and manages its lifetime.
- std::vector<ProfileSyncServiceHarness*>& clients() WARN_UNUSED_RESULT {
- return clients_.get();
- }
+ std::vector<ProfileSyncServiceHarness*>& clients() { return clients_.get(); }
// Returns a ProfileSyncService at the given index.
browser_sync::ProfileSyncService* GetSyncService(int index);
@@ -158,10 +164,10 @@ class SyncTest : public InProcessBrowserTest {
// Returns a pointer to the sync profile that is used to verify changes to
// individual sync profiles. Callee owns the object and manages its lifetime.
- Profile* verifier() WARN_UNUSED_RESULT;
+ Profile* verifier();
// Used to determine whether the verifier profile should be updated or not.
- bool use_verifier() WARN_UNUSED_RESULT { return use_verifier_; }
+ bool use_verifier() { return use_verifier_; }
// After calling this method, changes made to a profile will no longer be
// reflected in the verifier profile. Note: Not all datatypes use this.

Powered by Google App Engine
This is Rietveld 408576698