1# Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5AUTHOR = "ChromeOS Team" 6NAME = "cellular_DisableWhileConnecting.pseudomodem" 7PURPOSE = "Check that the 3G modem can handle a disconnect while connecting." 8CRITERIA = """ 9This test will fail if a disconnect request while the modem is 10connecting is not promptly executed. 11""" 12TIME = "SHORT" 13TEST_CATEGORY = "Functional" 14TEST_CLASS = "network" 15TEST_TYPE = "client" 16 17DOC = """ 18Check that the 3G modem can handle a disconnect while connecting. 19""" 20 21from autotest_lib.client.cros.cellular import test_environment 22 23ITERATIONS_PER_TEST=1 24 25# 3GPP 26test_env = test_environment.CellularPseudoMMTestEnvironment( 27 pseudomm_args=({'family': '3GPP'},)) 28job.run_test('cellular_DisableWhileConnecting', 29 test_env=test_env, 30 timeout_s=20, 31 delay_before_disable_ms=0, 32 disable_delay_per_iteration_ms=0, 33 iterations=ITERATIONS_PER_TEST, 34 tag='instant_disable_3GPP') 35 36test_env = test_environment.CellularPseudoMMTestEnvironment( 37 pseudomm_args=({'family': '3GPP'},)) 38job.run_test('cellular_DisableWhileConnecting', 39 test_env=test_env, 40 timeout_s=20, 41 delay_before_disable_ms=0, 42 disable_delay_per_iteration_ms=int(1000.0 / ITERATIONS_PER_TEST), 43 iterations=ITERATIONS_PER_TEST, 44 tag='disable_delay_ramp_3GPP') 45 46# CDMA 47test_env = test_environment.CellularPseudoMMTestEnvironment( 48 pseudomm_args=({'family': 'CDMA'},)) 49job.run_test('cellular_DisableWhileConnecting', 50 test_env=test_env, 51 timeout_s=20, 52 delay_before_disable_ms=0, 53 disable_delay_per_iteration_ms=0, 54 iterations=ITERATIONS_PER_TEST, 55 tag='instant_disable_CDMA') 56 57test_env = test_environment.CellularPseudoMMTestEnvironment( 58 pseudomm_args=({'family': 'CDMA'},)) 59job.run_test('cellular_DisableWhileConnecting', 60 test_env=test_env, 61 timeout_s=20, 62 delay_before_disable_ms=0, 63 disable_delay_per_iteration_ms=int(1000.0 / ITERATIONS_PER_TEST), 64 iterations=ITERATIONS_PER_TEST, 65 tag='disable_delay_ramp_CDMA') 66