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

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

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « net/proxy/proxy_config_service_android.cc ('k') | net/proxy/proxy_config_service_linux.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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/test/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_(base::MessageLoop::current()), 56 message_loop_(base::MessageLoop::current()),
57 service_(message_loop_->message_loop_proxy(), 57 service_(message_loop_->task_runner(),
58 message_loop_->message_loop_proxy(), 58 message_loop_->task_runner(),
59 base::Bind(&ProxyConfigServiceAndroidTestBase::GetProperty, 59 base::Bind(&ProxyConfigServiceAndroidTestBase::GetProperty,
60 base::Unretained(this))) {} 60 base::Unretained(this))) {}
61 61
62 ~ProxyConfigServiceAndroidTestBase() override {} 62 ~ProxyConfigServiceAndroidTestBase() override {}
63 63
64 // testing::Test: 64 // testing::Test:
65 void SetUp() override { 65 void SetUp() override {
66 message_loop_->RunUntilIdle(); 66 message_loop_->RunUntilIdle();
67 service_.AddObserver(&observer_); 67 service_.AddObserver(&observer_);
68 } 68 }
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 TEST_F(ProxyConfigServiceAndroidTest, HttpProxySupercedesSocks) { 341 TEST_F(ProxyConfigServiceAndroidTest, HttpProxySupercedesSocks) {
342 // SOCKS proxy is ignored if default HTTP proxy defined. 342 // SOCKS proxy is ignored if default HTTP proxy defined.
343 AddProperty("proxyHost", "defaultproxy.com"); 343 AddProperty("proxyHost", "defaultproxy.com");
344 AddProperty("socksProxyHost", "socksproxy.com"); 344 AddProperty("socksProxyHost", "socksproxy.com");
345 AddProperty("socksProxyPort", "9000"); 345 AddProperty("socksProxyPort", "9000");
346 ProxySettingsChanged(); 346 ProxySettingsChanged();
347 TestMapping("http://example.com/", "PROXY defaultproxy.com:80"); 347 TestMapping("http://example.com/", "PROXY defaultproxy.com:80");
348 } 348 }
349 349
350 } // namespace net 350 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_config_service_android.cc ('k') | net/proxy/proxy_config_service_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698