| 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 | 336 |
| 337 // Helper method that waits for up to |wait| for the test server | 337 // Helper method that waits for up to |wait| for the test server |
| 338 // to start. Splits the time into |intervals| intervals, and polls the | 338 // to start. Splits the time into |intervals| intervals, and polls the |
| 339 // server after each interval to see if it has started. Returns true if | 339 // server after each interval to see if it has started. Returns true if |
| 340 // successful. | 340 // successful. |
| 341 bool WaitForTestServerToStart(base::TimeDelta wait, int intervals); | 341 bool WaitForTestServerToStart(base::TimeDelta wait, int intervals); |
| 342 | 342 |
| 343 // Helper method used to check if the test server is up and running. | 343 // Helper method used to check if the test server is up and running. |
| 344 bool IsTestServerRunning(); | 344 bool IsTestServerRunning(); |
| 345 | 345 |
| 346 void SetupNetwork(net::URLRequestContextGetter* context); | |
| 347 | |
| 348 // Helper method used to set up fake responses for kClientLoginUrl, | 346 // Helper method used to set up fake responses for kClientLoginUrl, |
| 349 // kIssueAuthTokenUrl, kGetUserInfoUrl and kSearchDomainCheckUrl in order to | 347 // kIssueAuthTokenUrl, kGetUserInfoUrl and kSearchDomainCheckUrl in order to |
| 350 // mock out calls to GAIA servers. | 348 // mock out calls to GAIA servers. |
| 351 void SetupMockGaiaResponses(); | 349 void SetupMockGaiaResponses(); |
| 352 | 350 |
| 353 // Helper method used to clear any fake responses that might have been set for | 351 // Helper method used to clear any fake responses that might have been set for |
| 354 // various gaia URLs, cancel any outstanding URL requests, and return to using | 352 // various gaia URLs, cancel any outstanding URL requests, and return to using |
| 355 // the default URLFetcher creation mechanism. | 353 // the default URLFetcher creation mechanism. |
| 356 void ClearMockGaiaResponses(); | 354 void ClearMockGaiaResponses(); |
| 357 | 355 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 scoped_ptr<net::URLFetcherImplFactory> factory_; | 451 scoped_ptr<net::URLFetcherImplFactory> factory_; |
| 454 | 452 |
| 455 // The contents to be written to a profile's Preferences file before the | 453 // The contents to be written to a profile's Preferences file before the |
| 456 // Profile object is created. If empty, no preexisting file will be written. | 454 // Profile object is created. If empty, no preexisting file will be written. |
| 457 std::string preexisting_preferences_file_contents_; | 455 std::string preexisting_preferences_file_contents_; |
| 458 | 456 |
| 459 DISALLOW_COPY_AND_ASSIGN(SyncTest); | 457 DISALLOW_COPY_AND_ASSIGN(SyncTest); |
| 460 }; | 458 }; |
| 461 | 459 |
| 462 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ | 460 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ |
| OLD | NEW |