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 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 | 893 |
894 const chromeos::NetworkState* GetDefaultNetwork() { | 894 const chromeos::NetworkState* GetDefaultNetwork() { |
895 chromeos::NetworkStateHandler* handler = | 895 chromeos::NetworkStateHandler* handler = |
896 chromeos::NetworkHandler::Get()->network_state_handler(); | 896 chromeos::NetworkHandler::Get()->network_state_handler(); |
897 return handler->DefaultNetwork(); | 897 return handler->DefaultNetwork(); |
898 } | 898 } |
899 | 899 |
900 void SetProxyPref(const std::string& name, const base::Value& value) { | 900 void SetProxyPref(const std::string& name, const base::Value& value) { |
901 std::string type; | 901 std::string type; |
902 switch (value.GetType()) { | 902 switch (value.GetType()) { |
903 case base::Value::TYPE_BOOLEAN: | 903 case base::Value::Type::BOOLEAN: |
904 type = "Boolean"; | 904 type = "Boolean"; |
905 break; | 905 break; |
906 case base::Value::TYPE_INTEGER: | 906 case base::Value::Type::INTEGER: |
907 type = "Integer"; | 907 type = "Integer"; |
908 break; | 908 break; |
909 case base::Value::TYPE_STRING: | 909 case base::Value::Type::STRING: |
910 type = "String"; | 910 type = "String"; |
911 break; | 911 break; |
912 default: | 912 default: |
913 ASSERT_TRUE(false); | 913 ASSERT_TRUE(false); |
914 } | 914 } |
915 | 915 |
916 std::string observed_json; | 916 std::string observed_json; |
917 SetPref(name, type, &value, true, &observed_json); | 917 SetPref(name, type, &value, true, &observed_json); |
918 } | 918 } |
919 | 919 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 base::FundamentalValue(3)); | 1094 base::FundamentalValue(3)); |
1095 SetProxyPref(chromeos::proxy_cros_settings_parser::kProxySocksPort, | 1095 SetProxyPref(chromeos::proxy_cros_settings_parser::kProxySocksPort, |
1096 base::FundamentalValue(4)); | 1096 base::FundamentalValue(4)); |
1097 | 1097 |
1098 VerifyCurrentProxyServer( | 1098 VerifyCurrentProxyServer( |
1099 "http=a.com:1;https=4.3.2.1:2;ftp=c.com:3;socks=socks4://d.com:4", | 1099 "http=a.com:1;https=4.3.2.1:2;ftp=c.com:3;socks=socks4://d.com:4", |
1100 onc::ONC_SOURCE_NONE); | 1100 onc::ONC_SOURCE_NONE); |
1101 } | 1101 } |
1102 | 1102 |
1103 #endif | 1103 #endif |
OLD | NEW |