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

Side by Side Diff: net/proxy/proxy_config_service_android_unittest.cc

Issue 12811011: net: move test files out of net/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android Created 7 years, 9 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
« no previous file with comments | « net/net.gyp ('k') | net/test/net_test_suite.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 ProxyConfigService::ConfigAvailability availability_; 43 ProxyConfigService::ConfigAvailability availability_;
44 }; 44 };
45 45
46 } // namespace 46 } // namespace
47 47
48 typedef std::map<std::string, std::string> StringMap; 48 typedef std::map<std::string, std::string> StringMap;
49 49
50 class ProxyConfigServiceAndroidTestBase : public testing::Test { 50 class ProxyConfigServiceAndroidTestBase : public testing::Test {
51 protected: 51 protected:
52 // Note that the current thread's message loop is initialized by the test 52 // Note that the current thread's message loop is initialized by the test
53 // suite (see net/base/net_test_suite.cc). 53 // suite (see net/test/net_test_suite.cc).
54 ProxyConfigServiceAndroidTestBase(const StringMap& initial_configuration) 54 ProxyConfigServiceAndroidTestBase(const StringMap& initial_configuration)
55 : configuration_(initial_configuration), 55 : configuration_(initial_configuration),
56 message_loop_(MessageLoop::current()), 56 message_loop_(MessageLoop::current()),
57 service_( 57 service_(
58 message_loop_->message_loop_proxy(), 58 message_loop_->message_loop_proxy(),
59 message_loop_->message_loop_proxy(), 59 message_loop_->message_loop_proxy(),
60 base::Bind(&ProxyConfigServiceAndroidTestBase::GetProperty, 60 base::Bind(&ProxyConfigServiceAndroidTestBase::GetProperty,
61 base::Unretained(this))) {} 61 base::Unretained(this))) {}
62 62
63 virtual ~ProxyConfigServiceAndroidTestBase() {} 63 virtual ~ProxyConfigServiceAndroidTestBase() {}
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 TEST_F(ProxyConfigServiceAndroidTest, HttpProxySupercedesSocks) { 344 TEST_F(ProxyConfigServiceAndroidTest, HttpProxySupercedesSocks) {
345 // SOCKS proxy is ignored if default HTTP proxy defined. 345 // SOCKS proxy is ignored if default HTTP proxy defined.
346 AddProperty("proxyHost", "defaultproxy.com"); 346 AddProperty("proxyHost", "defaultproxy.com");
347 AddProperty("socksProxyHost", "socksproxy.com"); 347 AddProperty("socksProxyHost", "socksproxy.com");
348 AddProperty("socksProxyPort", "9000"); 348 AddProperty("socksProxyPort", "9000");
349 ProxySettingsChanged(); 349 ProxySettingsChanged();
350 TestMapping("http://example.com/", "PROXY defaultproxy.com:80"); 350 TestMapping("http://example.com/", "PROXY defaultproxy.com:80");
351 } 351 }
352 352
353 } // namespace net 353 } // namespace net
OLDNEW
« no previous file with comments | « net/net.gyp ('k') | net/test/net_test_suite.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698