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

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

Issue 3043018: base: Add UnSetEnv function to EnvVarGetter API. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: Created 10 years, 4 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "net/proxy/proxy_config_service_linux.h" 5 #include "net/proxy/proxy_config_service_linux.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 const char* env_value = table.Get(variable_name); 108 const char* env_value = table.Get(variable_name);
109 if (env_value) { 109 if (env_value) {
110 // Note that the variable may be defined but empty. 110 // Note that the variable may be defined but empty.
111 *result = env_value; 111 *result = env_value;
112 return true; 112 return true;
113 } 113 }
114 return false; 114 return false;
115 } 115 }
116 116
117 virtual bool SetEnv(const char* variable_name, const std::string& new_value) { 117 virtual bool SetEnv(const char* variable_name, const std::string& new_value) {
118 NOTIMPLEMENTED(); 118 ADD_FAILURE();
119 return false; 119 return false;
120 } 120 }
121 121
122 virtual bool UnSetEnv(const char* variable_name) {
123 ADD_FAILURE();
124 return false;
125 }
126
122 // Intentionally public, for convenience when setting up a test. 127 // Intentionally public, for convenience when setting up a test.
123 EnvVarValues values; 128 EnvVarValues values;
124 129
125 private: 130 private:
126 SettingsTable<const char*> table; 131 SettingsTable<const char*> table;
127 }; 132 };
128 133
129 class MockGConfSettingGetter 134 class MockGConfSettingGetter
130 : public ProxyConfigServiceLinux::GConfSettingGetter { 135 : public ProxyConfigServiceLinux::GConfSettingGetter {
131 public: 136 public:
(...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 new ProxyConfigServiceLinux(env_getter)); 1398 new ProxyConfigServiceLinux(env_getter));
1394 ProxyConfig config; 1399 ProxyConfig config;
1395 sync_config_getter.SetupAndInitialFetch(); 1400 sync_config_getter.SetupAndInitialFetch();
1396 sync_config_getter.SyncGetLatestProxyConfig(&config); 1401 sync_config_getter.SyncGetLatestProxyConfig(&config);
1397 EXPECT_TRUE(config.auto_detect()); 1402 EXPECT_TRUE(config.auto_detect());
1398 EXPECT_EQ(GURL(), config.pac_url()); 1403 EXPECT_EQ(GURL(), config.pac_url());
1399 } 1404 }
1400 } 1405 }
1401 1406
1402 } // namespace net 1407 } // namespace net
OLDNEW
« chrome/plugin/plugin_main_mac.mm ('K') | « chrome/plugin/plugin_main_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698