| Index: chrome/test/live_sync/live_sync_test.cc
|
| diff --git a/chrome/test/live_sync/live_sync_test.cc b/chrome/test/live_sync/live_sync_test.cc
|
| index d768b585d38962b4e892581b6e75172fd7107e6b..77a7c49b85f7ebc5f842681ee4d8a51f47ed2225 100644
|
| --- a/chrome/test/live_sync/live_sync_test.cc
|
| +++ b/chrome/test/live_sync/live_sync_test.cc
|
| @@ -131,16 +131,11 @@ LiveSyncTest::LiveSyncTest(TestType test_type)
|
| }
|
|
|
| void LiveSyncTest::SetUp() {
|
| - // At this point, the browser hasn't been launched, and no services are
|
| - // available. But we can verify our command line parameters and fail
|
| - // early.
|
| CommandLine* cl = CommandLine::ForCurrentProcess();
|
| if (cl->HasSwitch(switches::kPasswordFileForTest)) {
|
| ReadPasswordFile();
|
| } else if (cl->HasSwitch(switches::kSyncUserForTest) &&
|
| cl->HasSwitch(switches::kSyncPasswordForTest)) {
|
| - // Read GAIA credentials from the "--sync-XXX-for-test" command line
|
| - // parameters.
|
| username_ = cl->GetSwitchValueASCII(switches::kSyncUserForTest);
|
| password_ = cl->GetSwitchValueASCII(switches::kSyncPasswordForTest);
|
| } else {
|
| @@ -149,21 +144,6 @@ void LiveSyncTest::SetUp() {
|
| if (username_.empty() || password_.empty())
|
| LOG(FATAL) << "Cannot run sync tests without GAIA credentials.";
|
|
|
| - // TODO(rsimha): Until we implement a fake Tango server against which tests
|
| - // can run, we need to set the --sync-notification-method to "p2p".
|
| - if (!cl->HasSwitch(switches::kSyncNotificationMethod))
|
| - cl->AppendSwitchASCII(switches::kSyncNotificationMethod, "p2p");
|
| -
|
| - // TODO(sync): Remove this once sessions sync is enabled by default.
|
| - if (!cl->HasSwitch(switches::kEnableSyncSessions)) {
|
| - cl->AppendSwitch(switches::kEnableSyncSessions);
|
| - }
|
| -
|
| - // TODO(sync): Remove this once passwords sync is enabled by default.
|
| - if (!cl->HasSwitch(switches::kEnableSyncPasswords)) {
|
| - cl->AppendSwitch(switches::kEnableSyncPasswords);
|
| - }
|
| -
|
| // Mock the Mac Keychain service. The real Keychain can block on user input.
|
| #if defined(OS_MACOSX)
|
| Encryptor::UseMockKeychain(true);
|
| @@ -188,6 +168,25 @@ void LiveSyncTest::TearDown() {
|
| URLFetcher::set_factory(NULL);
|
| }
|
|
|
| +void LiveSyncTest::SetUpCommandLine(CommandLine* cl) {
|
| + // TODO(rsimha): Until we implement a fake Tango server against which tests
|
| + // can run, we need to set the --sync-notification-method to "p2p".
|
| + if (!cl->HasSwitch(switches::kSyncNotificationMethod))
|
| + cl->AppendSwitchASCII(switches::kSyncNotificationMethod, "p2p");
|
| +
|
| + // TODO(sync): Remove this once sessions sync is enabled by default.
|
| + if (!cl->HasSwitch(switches::kEnableSyncSessions))
|
| + cl->AppendSwitch(switches::kEnableSyncSessions);
|
| +
|
| + // TODO(sync): Remove this once passwords sync is enabled by default.
|
| + if (!cl->HasSwitch(switches::kEnableSyncPasswords))
|
| + cl->AppendSwitch(switches::kEnableSyncPasswords);
|
| +
|
| + // Disable non-essential access of external network resources.
|
| + if (!cl->HasSwitch(switches::kDisableBackgroundNetworking))
|
| + cl->AppendSwitch(switches::kDisableBackgroundNetworking);
|
| +}
|
| +
|
| // static
|
| Profile* LiveSyncTest::MakeProfile(const FilePath::StringType name) {
|
| FilePath path;
|
|
|