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 = "network_3GDisableWhileConnecting.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""" 12ATTRIBUTES = "suite:network3g_pseudomodem" 13SUITE = "network3g_pseudomodem" 14TIME = "SHORT" 15TEST_CATEGORY = "Functional" 16TEST_CLASS = "network" 17TEST_TYPE = "client" 18 19DOC = """ 20Check that the 3G modem can handle a disconnect while connecting. 21""" 22 23from autotest_lib.client.cros.cellular import test_environment 24 25ITERATIONS_PER_TEST=1 26 27# 3GPP 28test_env = test_environment.CellularPseudoMMTestEnvironment( 29 pseudomm_args=({'family': '3GPP'},)) 30job.run_test('network_3GDisableWhileConnecting', 31 test_env=test_env, 32 timeout_s=20, 33 delay_before_disable_ms=0, 34 disable_delay_per_iteration_ms=0, 35 iterations=ITERATIONS_PER_TEST, 36 tag='instant_disable_3GPP') 37 38test_env = test_environment.CellularPseudoMMTestEnvironment( 39 pseudomm_args=({'family': '3GPP'},)) 40job.run_test('network_3GDisableWhileConnecting', 41 test_env=test_env, 42 timeout_s=20, 43 delay_before_disable_ms=0, 44 disable_delay_per_iteration_ms=int(1000.0 / ITERATIONS_PER_TEST), 45 iterations=ITERATIONS_PER_TEST, 46 tag='disable_delay_ramp_3GPP') 47 48# CDMA 49test_env = test_environment.CellularPseudoMMTestEnvironment( 50 pseudomm_args=({'family': 'CDMA'},)) 51job.run_test('network_3GDisableWhileConnecting', 52 test_env=test_env, 53 timeout_s=20, 54 delay_before_disable_ms=0, 55 disable_delay_per_iteration_ms=0, 56 iterations=ITERATIONS_PER_TEST, 57 tag='instant_disable_CDMA') 58 59test_env = test_environment.CellularPseudoMMTestEnvironment( 60 pseudomm_args=({'family': 'CDMA'},)) 61job.run_test('network_3GDisableWhileConnecting', 62 test_env=test_env, 63 timeout_s=20, 64 delay_before_disable_ms=0, 65 disable_delay_per_iteration_ms=int(1000.0 / ITERATIONS_PER_TEST), 66 iterations=ITERATIONS_PER_TEST, 67 tag='disable_delay_ramp_CDMA') 68