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

Unified Diff: tools/telemetry/telemetry/android/shared_android_state.py

Issue 1647513002: Delete tools/telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/telemetry/telemetry/android/android_story.py ('k') | tools/telemetry/telemetry/benchmark.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/android/shared_android_state.py
diff --git a/tools/telemetry/telemetry/android/shared_android_state.py b/tools/telemetry/telemetry/android/shared_android_state.py
deleted file mode 100644
index bb813bd086cf9313068588a11be693013ec3140b..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/android/shared_android_state.py
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-from telemetry.core import android_platform
-from telemetry.core import platform
-from telemetry.internal.platform import android_device
-from telemetry import story as story_module
-from telemetry.web_perf import timeline_based_measurement
-
-
-class SharedAndroidState(story_module.SharedState):
- """Manage test state/transitions across multiple android.AndroidStory's.
-
- WARNING: the class is not ready for public consumption.
- Email telemetry@chromium.org if you feel like you must use it.
- """
-
- def __init__(self, test, finder_options, story_set):
- """This method is styled on unittest.TestCase.setUpClass.
-
- Args:
- test: a web_perf.TimelineBasedMeasurement instance.
- options: a BrowserFinderOptions instance with command line options.
- story_set: a story.StorySet instance.
- """
- super(SharedAndroidState, self).__init__(test, finder_options, story_set)
- if not isinstance(
- test, timeline_based_measurement.TimelineBasedMeasurement):
- raise ValueError(
- 'SharedAndroidState only accepts TimelineBasedMeasurement tests'
- ' (not %s).' % test.__class__)
- self._test = test
- self._finder_options = finder_options
- self._android_app = None
- self._current_story = None
- device = android_device.GetDevice(finder_options)
- assert device, 'Android device required.'
- self._android_platform = platform.GetPlatformForDevice(
- device, finder_options)
- assert self._android_platform, 'Unable to create android platform.'
- assert isinstance(
- self._android_platform, android_platform.AndroidPlatform)
-
- @property
- def app(self):
- return self._android_app
-
- @property
- def platform(self):
- return self._android_platform
-
- def WillRunStory(self, story):
- assert not self._android_app
- self._current_story = story
- self._android_app = self._android_platform.LaunchAndroidApplication(
- story.start_intent, story.is_app_ready_predicate)
- self._test.WillRunStory(self._android_platform.tracing_controller)
-
- def CanRunStory(self, story):
- """This does not apply to android app stories."""
- return True
-
- def RunStory(self, results):
- self._current_story.Run(self)
- self._test.Measure(self._android_platform.tracing_controller, results)
-
- def DidRunStory(self, results):
- self._test.DidRunStory(self._android_platform.tracing_controller)
- if self._android_app:
- self._android_app.Close()
- self._android_app = None
-
- def TearDownState(self):
- """Tear down anything created in the __init__ method that is not needed.
-
- Currently, there is no clean-up needed from SharedAndroidState.__init__.
- """
- pass
« no previous file with comments | « tools/telemetry/telemetry/android/android_story.py ('k') | tools/telemetry/telemetry/benchmark.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698