| 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_TEST_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ |
| 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 ERROR_FREQUENCY_TWO_THIRDS | 110 ERROR_FREQUENCY_TWO_THIRDS |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 // A SyncTest must be associated with a particular test type. | 113 // A SyncTest must be associated with a particular test type. |
| 114 explicit SyncTest(TestType test_type); | 114 explicit SyncTest(TestType test_type); |
| 115 | 115 |
| 116 virtual ~SyncTest(); | 116 virtual ~SyncTest(); |
| 117 | 117 |
| 118 // Validates command line parameters and creates a local python test server if | 118 // Validates command line parameters and creates a local python test server if |
| 119 // specified. | 119 // specified. |
| 120 virtual void SetUp() OVERRIDE; | 120 virtual void SetUp() override; |
| 121 | 121 |
| 122 // Brings down local python test server if one was created. | 122 // Brings down local python test server if one was created. |
| 123 virtual void TearDown() OVERRIDE; | 123 virtual void TearDown() override; |
| 124 | 124 |
| 125 // Sets up command line flags required for sync tests. | 125 // Sets up command line flags required for sync tests. |
| 126 virtual void SetUpCommandLine(base::CommandLine* cl) OVERRIDE; | 126 virtual void SetUpCommandLine(base::CommandLine* cl) override; |
| 127 | 127 |
| 128 // Used to get the number of sync clients used by a test. | 128 // Used to get the number of sync clients used by a test. |
| 129 int num_clients() WARN_UNUSED_RESULT { return num_clients_; } | 129 int num_clients() WARN_UNUSED_RESULT { return num_clients_; } |
| 130 | 130 |
| 131 // Returns a pointer to a particular sync profile. Callee owns the object | 131 // Returns a pointer to a particular sync profile. Callee owns the object |
| 132 // and manages its lifetime. | 132 // and manages its lifetime. |
| 133 Profile* GetProfile(int index) WARN_UNUSED_RESULT; | 133 Profile* GetProfile(int index) WARN_UNUSED_RESULT; |
| 134 | 134 |
| 135 // Returns a pointer to a particular browser. Callee owns the object | 135 // Returns a pointer to a particular browser. Callee owns the object |
| 136 // and manages its lifetime. | 136 // and manages its lifetime. |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 protected: | 252 protected: |
| 253 // Add custom switches needed for running the test. | 253 // Add custom switches needed for running the test. |
| 254 virtual void AddTestSwitches(base::CommandLine* cl); | 254 virtual void AddTestSwitches(base::CommandLine* cl); |
| 255 | 255 |
| 256 // Append the command line switches to enable experimental types that aren't | 256 // Append the command line switches to enable experimental types that aren't |
| 257 // on by default yet. | 257 // on by default yet. |
| 258 virtual void AddOptionalTypesToCommandLine(base::CommandLine* cl); | 258 virtual void AddOptionalTypesToCommandLine(base::CommandLine* cl); |
| 259 | 259 |
| 260 // BrowserTestBase override. Destroys all the sync clients and sync | 260 // BrowserTestBase override. Destroys all the sync clients and sync |
| 261 // profiles created by a test. | 261 // profiles created by a test. |
| 262 virtual void TearDownOnMainThread() OVERRIDE; | 262 virtual void TearDownOnMainThread() override; |
| 263 | 263 |
| 264 // InProcessBrowserTest override. Changes behavior of the default host | 264 // InProcessBrowserTest override. Changes behavior of the default host |
| 265 // resolver to avoid DNS lookup errors. | 265 // resolver to avoid DNS lookup errors. |
| 266 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; | 266 virtual void SetUpInProcessBrowserTestFixture() override; |
| 267 | 267 |
| 268 // InProcessBrowserTest override. Resets the host resolver its default | 268 // InProcessBrowserTest override. Resets the host resolver its default |
| 269 // behavior. | 269 // behavior. |
| 270 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE; | 270 virtual void TearDownInProcessBrowserTestFixture() override; |
| 271 | 271 |
| 272 // Creates Profile, Browser and ProfileSyncServiceHarness instances for | 272 // Creates Profile, Browser and ProfileSyncServiceHarness instances for |
| 273 // |index|. Used by SetupClients(). | 273 // |index|. Used by SetupClients(). |
| 274 virtual void InitializeInstance(int index); | 274 virtual void InitializeInstance(int index); |
| 275 | 275 |
| 276 // Implementations of the EnableNotifications() and DisableNotifications() | 276 // Implementations of the EnableNotifications() and DisableNotifications() |
| 277 // functions defined above. | 277 // functions defined above. |
| 278 void DisableNotificationsImpl(); | 278 void DisableNotificationsImpl(); |
| 279 void EnableNotificationsImpl(); | 279 void EnableNotificationsImpl(); |
| 280 | 280 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 // Fake URLFetcher factory used to mock out GAIA signin. | 418 // Fake URLFetcher factory used to mock out GAIA signin. |
| 419 scoped_ptr<net::FakeURLFetcherFactory> fake_factory_; | 419 scoped_ptr<net::FakeURLFetcherFactory> fake_factory_; |
| 420 | 420 |
| 421 // The URLFetcherImplFactory instance used to instantiate |fake_factory_|. | 421 // The URLFetcherImplFactory instance used to instantiate |fake_factory_|. |
| 422 scoped_ptr<net::URLFetcherImplFactory> factory_; | 422 scoped_ptr<net::URLFetcherImplFactory> factory_; |
| 423 | 423 |
| 424 DISALLOW_COPY_AND_ASSIGN(SyncTest); | 424 DISALLOW_COPY_AND_ASSIGN(SyncTest); |
| 425 }; | 425 }; |
| 426 | 426 |
| 427 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ | 427 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ |
| OLD | NEW |