OLD | NEW |
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/ui/webui/options/preferences_browsertest.h" | 5 #include "chrome/browser/ui/webui/options/preferences_browsertest.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <iostream> | 9 #include <iostream> |
10 #include <memory> | 10 #include <memory> |
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 class ProxyPreferencesBrowserTest : public PreferencesBrowserTest { | 828 class ProxyPreferencesBrowserTest : public PreferencesBrowserTest { |
829 public: | 829 public: |
830 void SetUpOnMainThread() override { | 830 void SetUpOnMainThread() override { |
831 SetupNetworkEnvironment(); | 831 SetupNetworkEnvironment(); |
832 content::RunAllPendingInMessageLoop(); | 832 content::RunAllPendingInMessageLoop(); |
833 | 833 |
834 std::unique_ptr<base::DictionaryValue> proxy_config_dict( | 834 std::unique_ptr<base::DictionaryValue> proxy_config_dict( |
835 ProxyConfigDictionary::CreateFixedServers("127.0.0.1:8080", | 835 ProxyConfigDictionary::CreateFixedServers("127.0.0.1:8080", |
836 "*.google.com, 1.2.3.4:22")); | 836 "*.google.com, 1.2.3.4:22")); |
837 | 837 |
838 ProxyConfigDictionary proxy_config(proxy_config_dict.get()); | 838 ProxyConfigDictionary proxy_config(std::move(proxy_config_dict)); |
839 | 839 |
840 const chromeos::NetworkState* network = GetDefaultNetwork(); | 840 const chromeos::NetworkState* network = GetDefaultNetwork(); |
841 ASSERT_TRUE(network); | 841 ASSERT_TRUE(network); |
842 chromeos::proxy_config::SetProxyConfigForNetwork(proxy_config, *network); | 842 chromeos::proxy_config::SetProxyConfigForNetwork(proxy_config, *network); |
843 | 843 |
844 std::string url = base::StringPrintf("%s?network=%s", | 844 std::string url = base::StringPrintf("%s?network=%s", |
845 chrome::kChromeUIProxySettingsURL, | 845 chrome::kChromeUIProxySettingsURL, |
846 network->guid().c_str()); | 846 network->guid().c_str()); |
847 | 847 |
848 ui_test_utils::NavigateToURL(browser(), GURL(url)); | 848 ui_test_utils::NavigateToURL(browser(), GURL(url)); |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 base::Value(3)); | 1097 base::Value(3)); |
1098 SetProxyPref(chromeos::proxy_cros_settings_parser::kProxySocksPort, | 1098 SetProxyPref(chromeos::proxy_cros_settings_parser::kProxySocksPort, |
1099 base::Value(4)); | 1099 base::Value(4)); |
1100 | 1100 |
1101 VerifyCurrentProxyServer( | 1101 VerifyCurrentProxyServer( |
1102 "http=a.com:1;https=4.3.2.1:2;ftp=c.com:3;socks=socks4://d.com:4", | 1102 "http=a.com:1;https=4.3.2.1:2;ftp=c.com:3;socks=socks4://d.com:4", |
1103 onc::ONC_SOURCE_NONE); | 1103 onc::ONC_SOURCE_NONE); |
1104 } | 1104 } |
1105 | 1105 |
1106 #endif | 1106 #endif |
OLD | NEW |