summaryrefslogtreecommitdiffstats
path: root/chrome/test/functional/chromeos_onc.py
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/functional/chromeos_onc.py')
-rwxr-xr-xchrome/test/functional/chromeos_onc.py28
1 files changed, 21 insertions, 7 deletions
diff --git a/chrome/test/functional/chromeos_onc.py b/chrome/test/functional/chromeos_onc.py
index 75a24d1..cfa0705 100755
--- a/chrome/test/functional/chromeos_onc.py
+++ b/chrome/test/functional/chromeos_onc.py
@@ -89,33 +89,47 @@ class ChromeosONC(policy_base.PolicyTestBase):
def testONCAddPSKWifi(self):
"""Test adding WPA network."""
wifi_networks = {
- 'ssid-wpa': 'PSK',
+ 'ssid-wpa': 'WPA',
}
self._ReadONCFileAndSet('network-wifi-wpa.onc')
self._VerifyRememberedWifiNetworks(wifi_networks)
def testAddBacktoBackONC(self):
+ """Test adding three different ONC files one after the other."""
+ test_dict = {
+ 'network-wifi-none.onc': { 'ssid-none': '' },
+ 'network-wifi-wep.onc': { 'ssid-wep': 'WEP' },
+ 'network-wifi-wpa.onc': { 'ssid-wpa': 'WPA' },
+ }
+
+ for onc, wifi_networks in test_dict.iteritems():
+ self._ReadONCFileAndSet(onc)
+ self._VerifyRememberedWifiNetworks(wifi_networks)
+
+ def testAddBacktoBackONC2(self):
"""Test adding three different ONC files one after the other.
- TODO(stanleyw): crosbug.com/29422 This test checks for buggy behavior that
- has since been fiex in crosbug.com/27862.
+ Due to inconsistent behaviors as addressed in crosbug.com/27862
+ this test does not perform a network scan/verification between
+ the setting of policies.
"""
+
wifi_networks = {
- 'ssid-none': '',
- 'ssid-wep': 'WEP',
- 'ssid-wpa': 'PSK',
+ 'ssid-wpa': 'WPA',
}
self._ReadONCFileAndSet('network-wifi-none.onc')
self._ReadONCFileAndSet('network-wifi-wep.onc')
self._ReadONCFileAndSet('network-wifi-wpa.onc')
+
+ # Verify that only the most recent onc is updated.
self._VerifyRememberedWifiNetworks(wifi_networks)
def testAddONCWithUnknownFields(self):
"""Test adding an ONC file with unknown fields."""
wifi_networks = {
'ssid-none': '',
- 'ssid-wpa': 'PSK'
+ 'ssid-wpa': 'WPA'
}
self._ReadONCFileAndSet('network-multiple-unknown.onc')