summaryrefslogtreecommitdiffstats
path: root/chromeos/test
diff options
context:
space:
mode:
authorstevenjb <stevenjb@chromium.org>2015-07-10 13:51:45 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-10 20:52:21 +0000
commit8336888d95e672e8642889cade066aed7bb1f595 (patch)
tree1b62f5aa6bd521ec84427d5165cd006a693aad98 /chromeos/test
parent33f347c7ee7a37dc1ef6a39fa1b4be89801f18ca (diff)
downloadchromium_src-8336888d95e672e8642889cade066aed7bb1f595.zip
chromium_src-8336888d95e672e8642889cade066aed7bb1f595.tar.gz
chromium_src-8336888d95e672e8642889cade066aed7bb1f595.tar.bz2
Translate ONC ProxySettings <-> Shill ProxyConfig
This CL adds translation of the ProxySettings property in an ONC dictionary to the ProxyConfig property of a Shill dictionary (which previously was not being handled). BUG=470445 TBR=abarth@chromium.org for DEPS change (+url) Review URL: https://codereview.chromium.org/1228543002 Cr-Commit-Position: refs/heads/master@{#338352}
Diffstat (limited to 'chromeos/test')
-rw-r--r--chromeos/test/data/network/proxy_config.json84
-rw-r--r--chromeos/test/data/network/shill_openvpn_clientcert.json1
-rw-r--r--chromeos/test/data/network/shill_wifi_clientcert.json1
-rw-r--r--chromeos/test/data/network/shill_wifi_clientref.json1
-rw-r--r--chromeos/test/data/network/shill_wifi_proxy.json6
-rw-r--r--chromeos/test/data/network/shill_wifi_proxy_pac.json6
-rw-r--r--chromeos/test/data/network/shill_wifi_psk.json1
-rw-r--r--chromeos/test/data/network/translation_of_shill_wifi_clientcert.onc4
-rw-r--r--chromeos/test/data/network/translation_of_shill_wifi_proxy.onc32
-rw-r--r--chromeos/test/data/network/translation_of_shill_wifi_proxy_pac.onc11
-rw-r--r--chromeos/test/data/network/wifi_proxy.onc32
-rw-r--r--chromeos/test/data/network/wifi_proxy_pac.onc11
12 files changed, 190 insertions, 0 deletions
diff --git a/chromeos/test/data/network/proxy_config.json b/chromeos/test/data/network/proxy_config.json
new file mode 100644
index 0000000..8e122d4
--- /dev/null
+++ b/chromeos/test/data/network/proxy_config.json
@@ -0,0 +1,84 @@
+[
+ { "ONC_ProxySettings": {
+ "Manual": {
+ "FTPProxy": {
+ "Host": "192.168.2.1",
+ "Port": 8889
+ },
+ "HTTPProxy": {
+ "Host": "192.168.2.1",
+ "Port": 8889
+ },
+ "SOCKS": {
+ "Host": "192.168.2.1",
+ "Port": 8889
+ },
+ "SecureHTTPProxy": {
+ "Host": "192.168.2.1",
+ "Port": 8889
+ }
+ },
+ "Type": "Manual"
+ },
+ "ProxyConfig": {
+ "mode":"fixed_servers",
+ "server":"ftp=192.168.2.1:8889;http=192.168.2.1:8889;socks=socks4://192.168.2.1:8889;https=192.168.2.1:8889"
+ }
+ },
+ {
+ "ONC_ProxySettings": {
+ "Type": "Manual",
+ "Manual": {
+ "HTTPProxy" : {
+ "Host" : "http.example.com",
+ "Port" : 1234
+ },
+ "SecureHTTPProxy" : {
+ "Host" : "https.example.com",
+ "Port" : 3456
+ },
+ "FTPProxy" : {
+ "Host" : "ftp.example.com",
+ "Port" : 5678
+ },
+ "SOCKS" : {
+ "Host" : "socks5://socks.example.com",
+ "Port" : 7890
+ }
+ },
+ "ExcludeDomains": [
+ "google.com",
+ "<local>"
+ ]
+ },
+ "ProxyConfig": {
+ "bypass_list":"google.com;\u003Clocal\u003E;",
+ "mode":"fixed_servers",
+ "server":"ftp=ftp.example.com:5678;http=http.example.com:1234;socks=socks5://socks.example.com:7890;https=https.example.com:3456"
+ }
+ },
+ { "ONC_ProxySettings": {
+ "Type": "PAC",
+ "PAC": "https://proxycfg.my.domain.com/proxy.dat"
+ },
+ "ProxyConfig": {
+ "mode":"pac_script",
+ "pac_mandatory":false,
+ "pac_url":"https://proxycfg.my.domain.com/proxy.dat"
+ }
+ },
+ { "ONC_ProxySettings": {
+ "Type": "WPAD"
+ },
+ "ProxyConfig": {
+ "mode": "auto_detect"
+ }
+ },
+ { "ONC_ProxySettings": {
+ "Type": "Direct"
+ },
+ "ProxyConfig": {
+ "mode": "direct"
+ }
+ }
+]
diff --git a/chromeos/test/data/network/shill_openvpn_clientcert.json b/chromeos/test/data/network/shill_openvpn_clientcert.json
index f82b1e2..437f0ad 100644
--- a/chromeos/test/data/network/shill_openvpn_clientcert.json
+++ b/chromeos/test/data/network/shill_openvpn_clientcert.json
@@ -7,6 +7,7 @@
"OpenVPN.User": "hans",
"Provider.Host": "terminus.muc",
"Provider.Type": "openvpn",
+ "ProxyConfig": "{\"mode\":\"direct\"}",
"SaveCredentials": true,
"Type": "vpn",
}
diff --git a/chromeos/test/data/network/shill_wifi_clientcert.json b/chromeos/test/data/network/shill_wifi_clientcert.json
index b3ff20f..65ab6cd 100644
--- a/chromeos/test/data/network/shill_wifi_clientcert.json
+++ b/chromeos/test/data/network/shill_wifi_clientcert.json
@@ -5,6 +5,7 @@
"EAP.UseSystemCAs": true,
"GUID": "{77db0089-0bc8-4358-929c-123xcv}",
"Mode": "managed",
+ "ProxyConfig": "{\"mode\":\"pac_script\",\"pac_mandatory\":false,\"pac_url\":\"https://proxycfg.my.domain.com/proxy.dat\"}",
"SaveCredentials": true,
"SecurityClass": "802_1x",
"Type": "wifi",
diff --git a/chromeos/test/data/network/shill_wifi_clientref.json b/chromeos/test/data/network/shill_wifi_clientref.json
index fb5be88..b04273b 100644
--- a/chromeos/test/data/network/shill_wifi_clientref.json
+++ b/chromeos/test/data/network/shill_wifi_clientref.json
@@ -4,6 +4,7 @@
"EAP.UseSystemCAs": true,
"GUID": "{77db0089-0bc8-4358-929c-123xcv}",
"Mode": "managed",
+ "ProxyConfig": "{\"mode\":\"pac_script\",\"pac_mandatory\":false,\"pac_url\":\"https://proxycfg.my.domain.com/proxy.dat\"}",
"SaveCredentials": true,
"SecurityClass": "802_1x",
"Type": "wifi",
diff --git a/chromeos/test/data/network/shill_wifi_proxy.json b/chromeos/test/data/network/shill_wifi_proxy.json
new file mode 100644
index 0000000..c7b273f
--- /dev/null
+++ b/chromeos/test/data/network/shill_wifi_proxy.json
@@ -0,0 +1,6 @@
+{
+ "Mode": "managed",
+ "ProxyConfig": "{\"bypass_list\":\"google.com;\\u003Clocal>;\",\"mode\":\"fixed_servers\",\"server\":\"ftp=ftp.example.com:5678;http=http.example.com:1234;socks=socks5://socks.example.com:7890;https=https.example.com:3456\"}",
+ "SecurityClass": "none",
+ "Type": "wifi",
+}
diff --git a/chromeos/test/data/network/shill_wifi_proxy_pac.json b/chromeos/test/data/network/shill_wifi_proxy_pac.json
new file mode 100644
index 0000000..1d5c22a
--- /dev/null
+++ b/chromeos/test/data/network/shill_wifi_proxy_pac.json
@@ -0,0 +1,6 @@
+{
+ "Mode": "managed",
+ "ProxyConfig": "{\"mode\":\"pac_script\",\"pac_mandatory\":false,\"pac_url\":\"http://pac.foo.com/script.pac\"}",
+ "SecurityClass": "none",
+ "Type": "wifi",
+}
diff --git a/chromeos/test/data/network/shill_wifi_psk.json b/chromeos/test/data/network/shill_wifi_psk.json
index ccbe176..2ba3b5d 100644
--- a/chromeos/test/data/network/shill_wifi_psk.json
+++ b/chromeos/test/data/network/shill_wifi_psk.json
@@ -3,6 +3,7 @@
"GUID": "{64c4f86b-cf6a-4e4a-8eff-456def}",
"Mode": "managed",
"Passphrase": "some passphrase",
+ "ProxyConfig": "{\"mode\":\"fixed_servers\",\"server\":\"ftp=192.168.2.1:8889;http=192.168.2.1:8889;socks=socks4://192.168.2.1:8889;https=192.168.2.1:8889\"}",
"SecurityClass": "psk",
"Type": "wifi",
"WiFi.HexSSID": "4F70656E577274", // "OpenWrt"
diff --git a/chromeos/test/data/network/translation_of_shill_wifi_clientcert.onc b/chromeos/test/data/network/translation_of_shill_wifi_clientcert.onc
index 52dd992..d3eb691 100644
--- a/chromeos/test/data/network/translation_of_shill_wifi_clientcert.onc
+++ b/chromeos/test/data/network/translation_of_shill_wifi_clientcert.onc
@@ -1,6 +1,10 @@
{
"GUID":"{77db0089-0bc8-4358-929c-123xcv}",
"Name":"",
+ "ProxySettings": {
+ "Type": "PAC",
+ "PAC": "https://proxycfg.my.domain.com/proxy.dat"
+ },
"Type":"WiFi",
"WiFi":{
"EAP": {
diff --git a/chromeos/test/data/network/translation_of_shill_wifi_proxy.onc b/chromeos/test/data/network/translation_of_shill_wifi_proxy.onc
new file mode 100644
index 0000000..abc5a29
--- /dev/null
+++ b/chromeos/test/data/network/translation_of_shill_wifi_proxy.onc
@@ -0,0 +1,32 @@
+{
+ "Name": "",
+ "ProxySettings": {
+ "Type": "Manual",
+ "Manual": {
+ "HTTPProxy" : {
+ "Host" : "http.example.com",
+ "Port" : 1234
+ },
+ "SecureHTTPProxy" : {
+ "Host" : "https.example.com",
+ "Port" : 3456
+ },
+ "FTPProxy" : {
+ "Host" : "ftp.example.com",
+ "Port" : 5678
+ },
+ "SOCKS" : {
+ "Host" : "socks5://socks.example.com",
+ "Port" : 7890
+ }
+ },
+ "ExcludeDomains": [
+ "google.com",
+ "<local>"
+ ]
+ },
+ "Type": "WiFi",
+ "WiFi": {
+ "Security": "None"
+ }
+}
diff --git a/chromeos/test/data/network/translation_of_shill_wifi_proxy_pac.onc b/chromeos/test/data/network/translation_of_shill_wifi_proxy_pac.onc
new file mode 100644
index 0000000..3721c62
--- /dev/null
+++ b/chromeos/test/data/network/translation_of_shill_wifi_proxy_pac.onc
@@ -0,0 +1,11 @@
+{
+ "Name": "",
+ "ProxySettings": {
+ "Type": "PAC",
+ "PAC": "http://pac.foo.com/script.pac"
+ },
+ "Type": "WiFi",
+ "WiFi": {
+ "Security": "None"
+ }
+}
diff --git a/chromeos/test/data/network/wifi_proxy.onc b/chromeos/test/data/network/wifi_proxy.onc
new file mode 100644
index 0000000..788954f
--- /dev/null
+++ b/chromeos/test/data/network/wifi_proxy.onc
@@ -0,0 +1,32 @@
+{
+ "Name": "wifi1",
+ "ProxySettings": {
+ "Type": "Manual",
+ "Manual": {
+ "HTTPProxy" : {
+ "Host" : "http.example.com",
+ "Port" : 1234
+ },
+ "SecureHTTPProxy" : {
+ "Host" : "https.example.com",
+ "Port" : 3456
+ },
+ "FTPProxy" : {
+ "Host" : "ftp.example.com",
+ "Port" : 5678
+ },
+ "SOCKS" : {
+ "Host" : "socks5://socks.example.com",
+ "Port" : 7890
+ }
+ },
+ "ExcludeDomains": [
+ "google.com",
+ "<local>"
+ ]
+ },
+ "Type": "WiFi",
+ "WiFi": {
+ "Security": "None"
+ }
+}
diff --git a/chromeos/test/data/network/wifi_proxy_pac.onc b/chromeos/test/data/network/wifi_proxy_pac.onc
new file mode 100644
index 0000000..140e1a6
--- /dev/null
+++ b/chromeos/test/data/network/wifi_proxy_pac.onc
@@ -0,0 +1,11 @@
+{
+ "Name": "wifi1",
+ "ProxySettings": {
+ "Type": "PAC",
+ "PAC": "http://pac.foo.com/script.pac"
+ },
+ "Type": "WiFi",
+ "WiFi": {
+ "Security": "None"
+ }
+}