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

Side by Side Diff: chrome/browser/chromeos/proxy_config_service_impl_unittest.cc

Issue 16512003: Configure networks requiring a certificate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Apply Feedback Created 7 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/chromeos/proxy_config_service_impl.h" 5 #include "chrome/browser/chromeos/proxy_config_service_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } // namespace 208 } // namespace
209 209
210 class ProxyConfigServiceImplTest : public testing::Test { 210 class ProxyConfigServiceImplTest : public testing::Test {
211 protected: 211 protected:
212 ProxyConfigServiceImplTest() 212 ProxyConfigServiceImplTest()
213 : ui_thread_(BrowserThread::UI, &loop_), 213 : ui_thread_(BrowserThread::UI, &loop_),
214 io_thread_(BrowserThread::IO, &loop_) {} 214 io_thread_(BrowserThread::IO, &loop_) {}
215 215
216 virtual void SetUp() { 216 virtual void SetUp() {
217 DBusThreadManager::InitializeWithStub(); 217 DBusThreadManager::InitializeWithStub();
218 NetworkHandler::Initialize(); 218 NetworkHandler::InitializeForTest();
219 219
220 SetUpNetwork(); 220 SetUpNetwork();
221 221
222 PrefProxyConfigTrackerImpl::RegisterPrefs(pref_service_.registry()); 222 PrefProxyConfigTrackerImpl::RegisterPrefs(pref_service_.registry());
223 ProxyConfigServiceImpl::RegisterPrefs(pref_service_.registry()); 223 ProxyConfigServiceImpl::RegisterPrefs(pref_service_.registry());
224 proxy_config_service_.reset(new ChromeProxyConfigService(NULL)); 224 proxy_config_service_.reset(new ChromeProxyConfigService(NULL));
225 config_service_impl_.reset(new ProxyConfigServiceImpl(&pref_service_)); 225 config_service_impl_.reset(new ProxyConfigServiceImpl(&pref_service_));
226 config_service_impl_->SetChromeProxyConfigService( 226 config_service_impl_->SetChromeProxyConfigService(
227 proxy_config_service_.get()); 227 proxy_config_service_.get());
228 // SetChromeProxyConfigService triggers update of initial prefs proxy 228 // SetChromeProxyConfigService triggers update of initial prefs proxy
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 pref_service_.RemoveRecommendedPref(prefs::kProxy); 442 pref_service_.RemoveRecommendedPref(prefs::kProxy);
443 SyncGetLatestProxyConfig(&actual_config); 443 SyncGetLatestProxyConfig(&actual_config);
444 EXPECT_EQ(network_params.auto_detect, actual_config.auto_detect()); 444 EXPECT_EQ(network_params.auto_detect, actual_config.auto_detect());
445 EXPECT_EQ(network_params.pac_url, actual_config.pac_url()); 445 EXPECT_EQ(network_params.pac_url, actual_config.pac_url());
446 EXPECT_TRUE(network_params.proxy_rules.Matches( 446 EXPECT_TRUE(network_params.proxy_rules.Matches(
447 actual_config.proxy_rules())); 447 actual_config.proxy_rules()));
448 } 448 }
449 } 449 }
450 450
451 } // namespace chromeos 451 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698