~vila/ubuntu-test-cases/retry-apt-get-update

« back to all changes in this revision

Viewing changes to tests/memevent/ubuntu_test_cases/memory_usage_measurement/apps/__init__.py

  • Committer: Leo Arias
  • Date: 2014-11-10 19:28:56 UTC
  • mfrom: (345 touch)
  • mto: This revision was merged to the branch mainline in revision 352.
  • Revision ID: leo.arias@canonical.com-20141110192856-rgpksx9n9j0b39yl
Merged with the touch branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"""Application classes used to drive them easily with autopilot."""
 
2
 
 
3
from autopilot.input import Keyboard, Mouse, Pointer, Touch
 
4
from autopilot.platform import model
 
5
 
 
6
 
 
7
class App(object):
 
8
 
 
9
    """Application class with common code."""
 
10
 
 
11
    def __init__(self, tc):
 
12
        self.tc = tc
 
13
        self.app = None
 
14
        self.window = None
 
15
 
 
16
        self.keyboard = Keyboard.create()
 
17
        if model() == 'Desktop':
 
18
            input_device = Mouse.create()
 
19
        else:
 
20
            input_device = Touch.create()
 
21
        self.pointer = Pointer(input_device)