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

Unified Diff: chrome/browser/chromeos/proxy_config_service_impl_unittest.cc

Issue 6597070: Allow ProxyConfigService to report "no configuration set" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: PollingProxyConfigService adjustments Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/proxy_config_service_impl_unittest.cc
diff --git a/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc b/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc
index c2ac945bd560917c86ff6f64b7440fd284ece6f7..fa3a54b849cb0dc871800e3fb09c4f5b6b8765ed 100644
--- a/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc
+++ b/chrome/browser/chromeos/proxy_config_service_impl_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -547,16 +547,23 @@ TEST_F(ProxyConfigServiceImplTest, ProxyChangedObserver) {
virtual ~ProxyChangedObserver() {
config_service_->RemoveObserver(this);
}
+ net::ProxyConfigService::ConfigAvailability availability() const {
+ return availability_;
+ }
const net::ProxyConfig& config() const {
return config_;
}
private:
- virtual void OnProxyConfigChanged(const net::ProxyConfig& config) {
+ virtual void OnProxyConfigChanged(
+ const net::ProxyConfig& config,
+ net::ProxyConfigService::ConfigAvailability availability) {
config_ = config;
+ availability_ = availability;
}
scoped_refptr<ProxyConfigServiceImpl> config_service_;
+ net::ProxyConfigService::ConfigAvailability availability_;
net::ProxyConfig config_;
};
@@ -576,6 +583,7 @@ TEST_F(ProxyConfigServiceImplTest, ProxyChangedObserver) {
SyncGetLatestProxyConfig(&io_config);
// Observer should have gotten the same new proxy config.
+ EXPECT_EQ(net::ProxyConfigService::CONFIG_VALID, observer.availability());
EXPECT_TRUE(io_config.Equals(observer.config()));
}

Powered by Google App Engine
This is Rietveld 408576698