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

Unified Diff: net/proxy/proxy_config_service_win_unittest.cc

Issue 413763003: clang/win: Fix most -Wwriteable-strings warnings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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
« no previous file with comments | « net/cert/cert_verify_proc_win.cc ('k') | printing/backend/win_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_config_service_win_unittest.cc
diff --git a/net/proxy/proxy_config_service_win_unittest.cc b/net/proxy/proxy_config_service_win_unittest.cc
index 911949d59944a753733875e48753a4327108e393..d8766c685cb1c0877c0f3d2db3a38d79dc321824 100644
--- a/net/proxy/proxy_config_service_win_unittest.cc
+++ b/net/proxy/proxy_config_service_win_unittest.cc
@@ -12,9 +12,16 @@
namespace net {
TEST(ProxyConfigServiceWinTest, SetFromIEConfig) {
+ // Like WINHTTP_CURRENT_USER_IE_PROXY_CONFIG, but with const strings.
+ struct IEProxyConfig {
+ BOOL auto_detect;
+ const wchar_t* auto_config_url;
+ const wchar_t* proxy;
+ const wchar_t* proxy_bypass;;
Reid Kleckner 2014/07/23 22:02:15 Double semi-colon?
Nico 2014/07/23 22:04:17 Done, thanks.
+ };
const struct {
// Input.
- WINHTTP_CURRENT_USER_IE_PROXY_CONFIG ie_config;
+ IEProxyConfig ie_config;
// Expected outputs (fields of the ProxyConfig).
bool auto_detect;
@@ -190,8 +197,13 @@ TEST(ProxyConfigServiceWinTest, SetFromIEConfig) {
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
+ WINHTTP_CURRENT_USER_IE_PROXY_CONFIG ie_config = {
+ tests[i].ie_config.auto_detect,
+ const_cast<wchar_t*>(tests[i].ie_config.auto_config_url),
+ const_cast<wchar_t*>(tests[i].ie_config.proxy),
+ const_cast<wchar_t*>(tests[i].ie_config.proxy_bypass)};
ProxyConfig config;
- ProxyConfigServiceWin::SetFromIEConfig(&config, tests[i].ie_config);
+ ProxyConfigServiceWin::SetFromIEConfig(&config, ie_config);
EXPECT_EQ(tests[i].auto_detect, config.auto_detect());
EXPECT_EQ(tests[i].pac_url, config.pac_url());
« no previous file with comments | « net/cert/cert_verify_proc_win.cc ('k') | printing/backend/win_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698