Chromium Code Reviews| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 257 // If non-empty, |contents| will be written to a profile's Preferences file | 257 // If non-empty, |contents| will be written to a profile's Preferences file |
| 258 // before the Profile object is created. | 258 // before the Profile object is created. |
| 259 void SetPreexistingPreferencesFileContents(const std::string& contents); | 259 void SetPreexistingPreferencesFileContents(const std::string& contents); |
| 260 | 260 |
| 261 // GAIA account used by the test case. | 261 // GAIA account used by the test case. |
| 262 std::string username_; | 262 std::string username_; |
| 263 | 263 |
| 264 // GAIA password used by the test case. | 264 // GAIA password used by the test case. |
| 265 std::string password_; | 265 std::string password_; |
| 266 | 266 |
| 267 // Flag to indicate the need to create Gaia user account at runtime. This can | |
|
pval...(no longer on Chromium)
2015/08/26 19:26:33
s/Flag to indicate/Indicates/
IMO flag has the st
shadi
2015/09/03 22:17:08
Done.
| |
| 268 // only work when running against external servers with support for user | |
| 269 // creation via http requests. | |
| 270 bool create_gaia_account_at_runtime_; | |
| 271 | |
| 267 // Locally available plain text file in which GAIA credentials are stored. | 272 // Locally available plain text file in which GAIA credentials are stored. |
| 268 base::FilePath password_file_; | 273 base::FilePath password_file_; |
| 269 | 274 |
| 270 // The FakeServer used in tests with server type IN_PROCESS_FAKE_SERVER. | 275 // The FakeServer used in tests with server type IN_PROCESS_FAKE_SERVER. |
| 271 scoped_ptr<fake_server::FakeServer> fake_server_; | 276 scoped_ptr<fake_server::FakeServer> fake_server_; |
| 272 | 277 |
| 273 private: | 278 private: |
| 274 // Helper to ProfileManager::CreateProfileAsync that creates a new profile | 279 // Helper to ProfileManager::CreateProfileAsync that creates a new profile |
| 275 // used for UI Signin. Blocks until profile is created. | 280 // used for UI Signin. Blocks until profile is created. |
| 276 static Profile* MakeProfileForUISignin(const base::FilePath::StringType name); | 281 static Profile* MakeProfileForUISignin(const base::FilePath::StringType name); |
| 277 | 282 |
| 278 // Callback for CreateNewProfile() method. It runs the quit_closure once | 283 // Callback for CreateNewProfile() method. It runs the quit_closure once |
| 279 // profile is created successfully. | 284 // profile is created successfully. |
| 280 static void CreateProfileCallback(const base::Closure& quit_closure, | 285 static void CreateProfileCallback(const base::Closure& quit_closure, |
| 281 Profile* profile, | 286 Profile* profile, |
| 282 Profile::CreateStatus status); | 287 Profile::CreateStatus status); |
| 283 | 288 |
| 284 // Helper to Profile::CreateProfile that handles path creation. It creates | 289 // Helper to Profile::CreateProfile that handles path creation. It creates |
| 285 // a profile then registers it as a testing profile. | 290 // a profile then registers it as a testing profile. |
| 286 Profile* MakeProfile(const base::FilePath::StringType name); | 291 Profile* MakeProfile(const base::FilePath::StringType name); |
| 287 | 292 |
| 293 // Create a Gaia account at runtime by accessing TestDataSetupServer server | |
|
pval...(no longer on Chromium)
2015/08/26 19:26:34
it's probably best to remove the reference to Test
shadi
2015/09/03 22:17:08
Done.
| |
| 294 // part of E2E authentication stack. | |
| 295 // This function should only be called when running against external servers | |
| 296 // which use local authentication servers. | |
| 297 // Returns true if account creation was successful, false otherwise. | |
| 298 bool CreateGaiaAccount(const std::string& user_name, | |
|
pval...(no longer on Chromium)
2015/08/26 19:26:34
should user_name be username instead?
shadi
2015/09/03 22:17:08
Done.
| |
| 299 const std::string& password); | |
| 300 | |
| 288 // Helper method used to read GAIA credentials from a local password file | 301 // Helper method used to read GAIA credentials from a local password file |
| 289 // specified via the "--password-file-for-test" command line switch. | 302 // specified via the "--password-file-for-test" command line switch. |
| 290 // Note: The password file must be a plain text file with exactly two lines -- | 303 // Note: The password file must be a plain text file with exactly two lines -- |
| 291 // the username on the first line and the password on the second line. | 304 // the username on the first line and the password on the second line. |
| 292 void ReadPasswordFile(); | 305 void ReadPasswordFile(); |
| 293 | 306 |
| 294 // Helper method that starts up a sync test server if required. | 307 // Helper method that starts up a sync test server if required. |
| 295 void SetUpTestServerIfRequired(); | 308 void SetUpTestServerIfRequired(); |
| 296 | 309 |
| 297 // Helper method used to start up a local python test server. Note: We set up | 310 // Helper method used to start up a local python test server. Note: We set up |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 412 scoped_ptr<net::URLFetcherImplFactory> factory_; | 425 scoped_ptr<net::URLFetcherImplFactory> factory_; |
| 413 | 426 |
| 414 // The contents to be written to a profile's Preferences file before the | 427 // The contents to be written to a profile's Preferences file before the |
| 415 // Profile object is created. If empty, no preexisting file will be written. | 428 // Profile object is created. If empty, no preexisting file will be written. |
| 416 std::string preexisting_preferences_file_contents_; | 429 std::string preexisting_preferences_file_contents_; |
| 417 | 430 |
| 418 DISALLOW_COPY_AND_ASSIGN(SyncTest); | 431 DISALLOW_COPY_AND_ASSIGN(SyncTest); |
| 419 }; | 432 }; |
| 420 | 433 |
| 421 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ | 434 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ |
| OLD | NEW |