OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/sync/test/integration/sync_test.h" | 5 #include "chrome/browser/sync/test/integration/sync_test.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 ASSERT_EQ(2U, tokens.size()) << "Password file \"" | 376 ASSERT_EQ(2U, tokens.size()) << "Password file \"" |
377 << password_file_.value() | 377 << password_file_.value() |
378 << "\" must contain exactly two lines of text."; | 378 << "\" must contain exactly two lines of text."; |
379 username_ = tokens[0]; | 379 username_ = tokens[0]; |
380 password_ = tokens[1]; | 380 password_ = tokens[1]; |
381 } | 381 } |
382 | 382 |
383 void SyncTest::SetupMockGaiaResponses() { | 383 void SyncTest::SetupMockGaiaResponses() { |
384 username_ = "user@gmail.com"; | 384 username_ = "user@gmail.com"; |
385 password_ = "password"; | 385 password_ = "password"; |
386 factory_.reset(new URLFetcherFactory()); | 386 factory_.reset(new URLFetcherImplFactory()); |
387 fake_factory_.reset(new FakeURLFetcherFactory(factory_.get())); | 387 fake_factory_.reset(new FakeURLFetcherFactory(factory_.get())); |
388 fake_factory_->SetFakeResponse(kClientLoginUrl, "SID=sid\nLSID=lsid", true); | 388 fake_factory_->SetFakeResponse(kClientLoginUrl, "SID=sid\nLSID=lsid", true); |
389 fake_factory_->SetFakeResponse(kGetUserInfoUrl, "email=user@gmail.com", true); | 389 fake_factory_->SetFakeResponse(kGetUserInfoUrl, "email=user@gmail.com", true); |
390 fake_factory_->SetFakeResponse(kIssueAuthTokenUrl, "auth", true); | 390 fake_factory_->SetFakeResponse(kIssueAuthTokenUrl, "auth", true); |
391 fake_factory_->SetFakeResponse(kSearchDomainCheckUrl, ".google.com", true); | 391 fake_factory_->SetFakeResponse(kSearchDomainCheckUrl, ".google.com", true); |
392 } | 392 } |
393 | 393 |
394 // Start up a local sync server based on the value of server_type_, which | 394 // Start up a local sync server based on the value of server_type_, which |
395 // was determined from the command line parameters. | 395 // was determined from the command line parameters. |
396 void SyncTest::SetUpTestServerIfRequired() { | 396 void SyncTest::SetUpTestServerIfRequired() { |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 const net::ProxyConfig& proxy_config) { | 705 const net::ProxyConfig& proxy_config) { |
706 base::WaitableEvent done(false, false); | 706 base::WaitableEvent done(false, false); |
707 BrowserThread::PostTask( | 707 BrowserThread::PostTask( |
708 BrowserThread::IO, | 708 BrowserThread::IO, |
709 FROM_HERE, | 709 FROM_HERE, |
710 new SetProxyConfigTask(&done, | 710 new SetProxyConfigTask(&done, |
711 context_getter, | 711 context_getter, |
712 proxy_config)); | 712 proxy_config)); |
713 done.Wait(); | 713 done.Wait(); |
714 } | 714 } |
OLD | NEW |