| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/env python | |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 3 # Use of this source code is governed by a BSD-style license that can be | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 import logging | |
| 7 import os | |
| 8 import sys | |
| 9 import time | |
| 10 | |
| 11 import pyauto_functional | |
| 12 import pyauto # pyauto_functional must come before pyauto | |
| 13 | |
| 14 class ChromeosCellularSanity(pyauto.PyUITest): | |
| 15 """Tests for ChromeOS network related functions.""" | |
| 16 | |
| 17 assert os.popen('modem status').read(), 'Device needs modem to run test.' | |
| 18 | |
| 19 def testConnectCellularNetwork(self): | |
| 20 """Connect to the cellular network if present.""" | |
| 21 | |
| 22 self.ConnectToCellularNetwork() | |
| 23 self.assertTrue(self.NetworkScan().get('connected_cellular'), | |
| 24 'Failed to connect to cellular network.') | |
| 25 self.DisconnectFromCellularNetwork() | |
| 26 self.assertFalse(self.NetworkScan().get('connected_cellular'), | |
| 27 'Failed to disconnect from cellular network.') | |
| 28 | |
| 29 | |
| 30 if __name__ == '__main__': | |
| 31 pyauto_functional.Main() | |
| OLD | NEW |