Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: chrome/browser/sync/test/integration/sync_test.cc

Issue 10581012: Move test_url_fetcher_factory.* from content/ to net/url_request (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove export annotations Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 10 #include "base/bind.h"
(...skipping 19 matching lines...) Expand all
30 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" 30 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
31 #include "chrome/browser/ui/browser.h" 31 #include "chrome/browser/ui/browser.h"
32 #include "chrome/browser/ui/browser_list.h" 32 #include "chrome/browser/ui/browser_list.h"
33 #include "chrome/common/chrome_paths.h" 33 #include "chrome/common/chrome_paths.h"
34 #include "chrome/common/chrome_switches.h" 34 #include "chrome/common/chrome_switches.h"
35 #include "chrome/common/net/gaia/gaia_urls.h" 35 #include "chrome/common/net/gaia/gaia_urls.h"
36 #include "chrome/test/base/testing_browser_process.h" 36 #include "chrome/test/base/testing_browser_process.h"
37 #include "chrome/test/base/ui_test_utils.h" 37 #include "chrome/test/base/ui_test_utils.h"
38 #include "content/public/browser/web_contents.h" 38 #include "content/public/browser/web_contents.h"
39 #include "content/public/test/test_browser_thread.h" 39 #include "content/public/test/test_browser_thread.h"
40 #include "content/public/test/test_url_fetcher_factory.h"
41 #include "googleurl/src/gurl.h" 40 #include "googleurl/src/gurl.h"
42 #include "net/base/escape.h" 41 #include "net/base/escape.h"
43 #include "net/base/load_flags.h" 42 #include "net/base/load_flags.h"
44 #include "net/base/network_change_notifier.h" 43 #include "net/base/network_change_notifier.h"
45 #include "net/proxy/proxy_config.h" 44 #include "net/proxy/proxy_config.h"
46 #include "net/proxy/proxy_config_service_fixed.h" 45 #include "net/proxy/proxy_config_service_fixed.h"
47 #include "net/proxy/proxy_service.h" 46 #include "net/proxy/proxy_service.h"
48 #include "net/test/test_server.h" 47 #include "net/test/test_server.h"
48 #include "net/url_request/test_url_fetcher_factory.h"
49 #include "net/url_request/url_fetcher.h" 49 #include "net/url_request/url_fetcher.h"
50 #include "net/url_request/url_fetcher_delegate.h" 50 #include "net/url_request/url_fetcher_delegate.h"
51 #include "net/url_request/url_request_context.h" 51 #include "net/url_request/url_request_context.h"
52 #include "net/url_request/url_request_context_getter.h" 52 #include "net/url_request/url_request_context_getter.h"
53 #include "net/url_request/url_request_status.h" 53 #include "net/url_request/url_request_status.h"
54 #include "sync/notifier/p2p_notifier.h" 54 #include "sync/notifier/p2p_notifier.h"
55 #include "sync/protocol/sync.pb.h" 55 #include "sync/protocol/sync.pb.h"
56 56
57 using content::BrowserThread; 57 using content::BrowserThread;
58 58
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 ASSERT_EQ(2U, tokens.size()) << "Password file \"" 388 ASSERT_EQ(2U, tokens.size()) << "Password file \""
389 << password_file_.value() 389 << password_file_.value()
390 << "\" must contain exactly two lines of text."; 390 << "\" must contain exactly two lines of text.";
391 username_ = tokens[0]; 391 username_ = tokens[0];
392 password_ = tokens[1]; 392 password_ = tokens[1];
393 } 393 }
394 394
395 void SyncTest::SetupMockGaiaResponses() { 395 void SyncTest::SetupMockGaiaResponses() {
396 username_ = "user@gmail.com"; 396 username_ = "user@gmail.com";
397 password_ = "password"; 397 password_ = "password";
398 factory_.reset(new URLFetcherImplFactory()); 398 factory_.reset(new net::URLFetcherImplFactory());
399 fake_factory_.reset(new FakeURLFetcherFactory(factory_.get())); 399 fake_factory_.reset(new net::FakeURLFetcherFactory(factory_.get()));
400 fake_factory_->SetFakeResponse( 400 fake_factory_->SetFakeResponse(
401 GaiaUrls::GetInstance()->client_login_url(), 401 GaiaUrls::GetInstance()->client_login_url(),
402 "SID=sid\nLSID=lsid", 402 "SID=sid\nLSID=lsid",
403 true); 403 true);
404 fake_factory_->SetFakeResponse( 404 fake_factory_->SetFakeResponse(
405 GaiaUrls::GetInstance()->get_user_info_url(), 405 GaiaUrls::GetInstance()->get_user_info_url(),
406 "email=user@gmail.com", 406 "email=user@gmail.com",
407 true); 407 true);
408 fake_factory_->SetFakeResponse( 408 fake_factory_->SetFakeResponse(
409 GaiaUrls::GetInstance()->issue_auth_token_url(), 409 GaiaUrls::GetInstance()->issue_auth_token_url(),
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 787
788 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, 788 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter,
789 const net::ProxyConfig& proxy_config) { 789 const net::ProxyConfig& proxy_config) {
790 base::WaitableEvent done(false, false); 790 base::WaitableEvent done(false, false);
791 BrowserThread::PostTask( 791 BrowserThread::PostTask(
792 BrowserThread::IO, FROM_HERE, 792 BrowserThread::IO, FROM_HERE,
793 base::Bind(&SetProxyConfigCallback, &done, 793 base::Bind(&SetProxyConfigCallback, &done,
794 make_scoped_refptr(context_getter), proxy_config)); 794 make_scoped_refptr(context_getter), proxy_config));
795 done.Wait(); 795 done.Wait();
796 } 796 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.h ('k') | chrome/browser/translate/translate_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698