Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: tools/telemetry/telemetry/user_story/android/shared_app_state.py

Issue 1126443002: Move user_story.user_story_set to story.story_set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up + rebase. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 from telemetry.core import platform 4 from telemetry.core import platform
5 from telemetry.core.platform import android_device 5 from telemetry.core.platform import android_device
6 from telemetry.core.platform import android_platform 6 from telemetry.core.platform import android_platform
7 from telemetry.story import shared_state 7 from telemetry.story import shared_state
8 from telemetry.web_perf import timeline_based_measurement 8 from telemetry.web_perf import timeline_based_measurement
9 9
10 10
11 class SharedAppState(shared_state.SharedState): 11 class SharedAppState(shared_state.SharedState):
12 """Manage test state/transitions across multiple android.UserStory's. 12 """Manage test state/transitions across multiple android.UserStory's.
13 13
14 WARNING: the class is not ready for public consumption. 14 WARNING: the class is not ready for public consumption.
15 Email telemetry@chromium.org if you feel like you must use it. 15 Email telemetry@chromium.org if you feel like you must use it.
16 """ 16 """
17 17
18 def __init__(self, test, finder_options, user_story_set): 18 def __init__(self, test, finder_options, story_set):
19 """This method is styled on unittest.TestCase.setUpClass. 19 """This method is styled on unittest.TestCase.setUpClass.
20 20
21 Args: 21 Args:
22 test: a web_perf.TimelineBasedMeasurement instance. 22 test: a web_perf.TimelineBasedMeasurement instance.
23 options: a BrowserFinderOptions instance with command line options. 23 options: a BrowserFinderOptions instance with command line options.
24 user_story_set: an android.UserStorySet instance. 24 story_set: an android.StorySet instance.
nednguyen 2015/05/12 15:39:49 a story.StorySet instance
aiolos (Not reviewing) 2015/05/12 20:45:32 This will fail during WillRunUserStory if a story.
nednguyen 2015/05/13 20:15:35 Ah, I forgot about this. Silly me, please ignore t
25 """ 25 """
26 super(SharedAppState, self).__init__(test, finder_options, user_story_set) 26 super(SharedAppState, self).__init__(test, finder_options, story_set)
27 if not isinstance( 27 if not isinstance(
28 test, timeline_based_measurement.TimelineBasedMeasurement): 28 test, timeline_based_measurement.TimelineBasedMeasurement):
29 raise ValueError( 29 raise ValueError(
30 'SharedAppState only accepts TimelineBasedMeasurement tests' 30 'SharedAppState only accepts TimelineBasedMeasurement tests'
31 ' (not %s).' % test.__class__) 31 ' (not %s).' % test.__class__)
32 self._test = test 32 self._test = test
33 self._finder_options = finder_options 33 self._finder_options = finder_options
34 self._android_app = None 34 self._android_app = None
35 self._current_user_story = None 35 self._current_user_story = None
36 self._android_platform = platform.GetPlatformForDevice( 36 self._android_platform = platform.GetPlatformForDevice(
(...skipping 30 matching lines...) Expand all
67 def GetTestExpectationAndSkipValue(self, expectations): 67 def GetTestExpectationAndSkipValue(self, expectations):
68 """This does not apply to android app user stories.""" 68 """This does not apply to android app user stories."""
69 return 'pass', None 69 return 'pass', None
70 70
71 def TearDownState(self, results): 71 def TearDownState(self, results):
72 """Tear down anything created in the __init__ method that is not needed. 72 """Tear down anything created in the __init__ method that is not needed.
73 73
74 Currently, there is no clean-up needed from SharedAppState.__init__. 74 Currently, there is no clean-up needed from SharedAppState.__init__.
75 """ 75 """
76 pass 76 pass
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/story/story_set_unittest.py ('k') | tools/telemetry/telemetry/user_story/user_story_set.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698