• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2015 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
5from autotest_lib.client.common_lib import error
6from autotest_lib.client.cros import touch_playback_test_base
7
8
9class touch_HasInput(touch_playback_test_base.touch_playback_test_base):
10    """Check that device has the input type specified."""
11    version = 1
12
13    def run_once(self, input_type=''):
14        """Entry point of this test.
15
16        @param input_type: a string representing the required input type.  See
17            the input_playback class for possible types.
18
19        """
20        if not input_type:
21            raise error.TestError('Please supply an input type!')
22
23        if not self.player.has(input_type):
24            raise error.TestFail('Device does not have a %s!' % input_type)
25