diff options
| -rw-r--r-- | chrome/test/data/chromeos/cros/network-multiple-unknown.onc | 1 | ||||
| -rwxr-xr-x | chrome/test/functional/chromeos_onc.py | 28 |
2 files changed, 22 insertions, 7 deletions
diff --git a/chrome/test/data/chromeos/cros/network-multiple-unknown.onc b/chrome/test/data/chromeos/cros/network-multiple-unknown.onc index 39183d1..632e52d 100644 --- a/chrome/test/data/chromeos/cros/network-multiple-unknown.onc +++ b/chrome/test/data/chromeos/cros/network-multiple-unknown.onc @@ -19,6 +19,7 @@ "Type": "WiFi", "Name": "My WiFi Network2", "WiFi": { + "Passphrase": "12345678", "SSID": "ssid-wpa", "Security": "WPA-PSK" } 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') |
