summaryrefslogtreecommitdiffstats
path: root/chromeos/test
diff options
context:
space:
mode:
authorpneubeck <pneubeck@chromium.org>2014-11-03 08:09:55 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-03 16:10:19 +0000
commit1ff2e0f5b43de3ad05083cc28246317a514c1f63 (patch)
tree9abc97ec5e6dd750116c97933ae8d43738f002f0 /chromeos/test
parented76c99e380d6d49a3b2231b1ac7a393e9b15d95 (diff)
downloadchromium_src-1ff2e0f5b43de3ad05083cc28246317a514c1f63.zip
chromium_src-1ff2e0f5b43de3ad05083cc28246317a514c1f63.tar.gz
chromium_src-1ff2e0f5b43de3ad05083cc28246317a514c1f63.tar.bz2
Set Service property ManagedCredentials for managed networks.
This allows autoconnect to policy pushed networks without the user having to manually trigger a successful connect once. BUG=424036 Review URL: https://codereview.chromium.org/647783005 Cr-Commit-Position: refs/heads/master@{#302433}
Diffstat (limited to 'chromeos/test')
-rw-r--r--chromeos/test/data/network/policy/policy_vpn_autoconnect.onc23
-rw-r--r--chromeos/test/data/network/policy/policy_wifi1_autoconnect.onc17
-rw-r--r--chromeos/test/data/network/policy/shill_policy_autoconnect_on_unconfigured_vpn.json16
-rw-r--r--chromeos/test/data/network/policy/shill_policy_autoconnect_on_unconfigured_wifi1.json12
-rw-r--r--chromeos/test/data/network/policy/shill_policy_on_managed_vpn.json1
5 files changed, 68 insertions, 1 deletions
diff --git a/chromeos/test/data/network/policy/policy_vpn_autoconnect.onc b/chromeos/test/data/network/policy/policy_vpn_autoconnect.onc
new file mode 100644
index 0000000..c4c985f
--- /dev/null
+++ b/chromeos/test/data/network/policy/policy_vpn_autoconnect.onc
@@ -0,0 +1,23 @@
+{
+ "NetworkConfigurations":[
+ {
+ "GUID":"{a3860e83-f03d-4cb1-bafa-b22c9e746950}",
+ "Name":"my vpn",
+ "Type":"VPN",
+ "VPN":{
+ "AutoConnect":true,
+ "Host":"vpn.my.domain.com",
+ "OpenVPN":{
+ "Password":"some password",
+ "Port":443,
+ "Proto":"udp",
+ "SaveCredentials":false,
+ "UserAuthenticationType":"Password",
+ "Username":"abc ${LOGIN_EMAIL} def"
+ },
+ "Type":"OpenVPN"
+ }
+ }
+ ],
+ "Type":"UnencryptedConfiguration"
+}
diff --git a/chromeos/test/data/network/policy/policy_wifi1_autoconnect.onc b/chromeos/test/data/network/policy/policy_wifi1_autoconnect.onc
new file mode 100644
index 0000000..e07e76b
--- /dev/null
+++ b/chromeos/test/data/network/policy/policy_wifi1_autoconnect.onc
@@ -0,0 +1,17 @@
+{
+ "NetworkConfigurations": [
+ {
+ "GUID": "policy_wifi1",
+ "Type": "WiFi",
+ "Name": "Managed wifi1",
+ "WiFi": {
+ "AutoConnect": true,
+ "Passphrase": "policy's passphrase",
+ "Recommended": [ "Passphrase" ],
+ "SSID": "wifi1",
+ "Security": "WPA-PSK"
+ }
+ }
+ ],
+ "Type": "UnencryptedConfiguration"
+}
diff --git a/chromeos/test/data/network/policy/shill_policy_autoconnect_on_unconfigured_vpn.json b/chromeos/test/data/network/policy/shill_policy_autoconnect_on_unconfigured_vpn.json
new file mode 100644
index 0000000..a8852a9
--- /dev/null
+++ b/chromeos/test/data/network/policy/shill_policy_autoconnect_on_unconfigured_vpn.json
@@ -0,0 +1,16 @@
+{
+ "AutoConnect": true,
+ "GUID":"{a3860e83-f03d-4cb1-bafa-b22c9e746950}",
+ "ManagedCredentials": true,
+ "Name":"my vpn",
+ "OpenVPN.Password":"some password",
+ "OpenVPN.Port":"443",
+ "OpenVPN.Proto":"udp",
+ "OpenVPN.User":"abc ${LOGIN_EMAIL} def",
+ "Provider.Host":"vpn.my.domain.com",
+ "Provider.Type":"openvpn",
+ "Profile": "/profile/user1/shill",
+ "UIData": "{\"onc_source\":\"user_policy\"}",
+ "SaveCredentials":false,
+ "Type":"vpn"
+}
diff --git a/chromeos/test/data/network/policy/shill_policy_autoconnect_on_unconfigured_wifi1.json b/chromeos/test/data/network/policy/shill_policy_autoconnect_on_unconfigured_wifi1.json
new file mode 100644
index 0000000..219af79
--- /dev/null
+++ b/chromeos/test/data/network/policy/shill_policy_autoconnect_on_unconfigured_wifi1.json
@@ -0,0 +1,12 @@
+{
+ "AutoConnect": true,
+ "GUID": "policy_wifi1",
+ "ManagedCredentials": true,
+ "Mode": "managed",
+ "Passphrase": "policy's passphrase",
+ "Profile": "/profile/user1/shill",
+ "Security": "psk",
+ "Type": "wifi",
+ "UIData": "{\"onc_source\":\"user_policy\"}",
+ "WiFi.HexSSID": "7769666931" // "wifi1"
+}
diff --git a/chromeos/test/data/network/policy/shill_policy_on_managed_vpn.json b/chromeos/test/data/network/policy/shill_policy_on_managed_vpn.json
index e94475a..15470fd6 100644
--- a/chromeos/test/data/network/policy/shill_policy_on_managed_vpn.json
+++ b/chromeos/test/data/network/policy/shill_policy_on_managed_vpn.json
@@ -14,4 +14,3 @@
"SaveCredentials":false,
"Type":"vpn"
}
-