• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2014 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.cros.webstore_test import ItemType
6from autotest_lib.client.cros.webstore_test import webstore_test
7
8class webstore_InstallItem(webstore_test):
9    """
10    Installs an item and tests that it installed correctly.
11
12    This is used by several tests, which pass the parameters item_id,
13    item_type, and install_type to the test. If it's an app, this
14    class verifies that the app can launch.
15    """
16    version = 1
17
18    def run(self, item_id, item_type, install_type):
19        self.install_item(item_id, item_type, install_type)
20        if item_type != ItemType.extension and item_type != ItemType.theme:
21            self.launch_app(item_id)
22