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 import copy | 5 import copy |
6 import dbus | 6 import dbus |
7 import logging | 7 import logging |
8 import os | 8 import os |
9 import time | 9 import time |
10 | 10 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 """ | 127 """ |
128 _ROUTER_CONFIG_FILE = os.path.join(pyauto.PyUITest.DataDir(), | 128 _ROUTER_CONFIG_FILE = os.path.join(pyauto.PyUITest.DataDir(), |
129 'pyauto_private', 'chromeos', 'network', | 129 'pyauto_private', 'chromeos', 'network', |
130 'wifi_testbed_config') | 130 'wifi_testbed_config') |
131 _FLIMFLAM_PATH = 'org.chromium.flimflam' | 131 _FLIMFLAM_PATH = 'org.chromium.flimflam' |
132 | 132 |
133 def setUp(self): | 133 def setUp(self): |
134 # Move ethernet to the end of the flimflam priority list, | 134 # Move ethernet to the end of the flimflam priority list, |
135 # effectively hiding any ssh connections that the | 135 # effectively hiding any ssh connections that the |
136 # test harness might be using and putting wifi ahead. | 136 # test harness might be using and putting wifi ahead. |
137 self._PushServiceOrder('vpn,bluetooth,wifi,wimax,cellular,ethernet') | 137 self._PushServiceOrder('wifi,ethernet') |
138 self._ParseDefaultRoutingTable() | 138 self._ParseDefaultRoutingTable() |
139 pyauto.PyUITest.setUp(self) | 139 pyauto.PyUITest.setUp(self) |
140 self.CleanupFlimflamDirsOnChromeOS() | 140 self.CleanupFlimflamDirsOnChromeOS() |
141 self.ForgetAllRememberedNetworks() | 141 self.ForgetAllRememberedNetworks() |
142 self._wifi_power_strip = None | 142 self._wifi_power_strip = None |
143 | 143 |
144 def tearDown(self): | 144 def tearDown(self): |
145 self.ForgetAllRememberedNetworks() | 145 self.ForgetAllRememberedNetworks() |
146 pyauto.PyUITest.tearDown(self) | 146 pyauto.PyUITest.tearDown(self) |
147 self._PopServiceOrder() | 147 self._PopServiceOrder() |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 else: | 338 else: |
339 service_path = self.GetServicePath(router['ssid']) | 339 service_path = self.GetServicePath(router['ssid']) |
340 assert service_path, 'Service with SSID %s is not present.' % \ | 340 assert service_path, 'Service with SSID %s is not present.' % \ |
341 router['ssid'] | 341 router['ssid'] |
342 | 342 |
343 logging.debug('Connecting to router %s.' % router_name) | 343 logging.debug('Connecting to router %s.' % router_name) |
344 error_string = self.ConnectToWifiNetwork(service_path, | 344 error_string = self.ConnectToWifiNetwork(service_path, |
345 password=passphrase, | 345 password=passphrase, |
346 shared=shared) | 346 shared=shared) |
347 return error_string | 347 return error_string |
OLD | NEW |