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

Unified Diff: tools/telemetry/telemetry/page/__init__.py

Issue 725133005: Move serving_dirs to UserStorySet, update user_story_runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comment. Created 6 years 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 | « no previous file | tools/telemetry/telemetry/page/page_set.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/page/__init__.py
diff --git a/tools/telemetry/telemetry/page/__init__.py b/tools/telemetry/telemetry/page/__init__.py
index 673a0f129caf63bd66ece5aaa6cd0142c5b31c3e..c000598bf31c6d3092a6139c51ef6242d4395a78 100644
--- a/tools/telemetry/telemetry/page/__init__.py
+++ b/tools/telemetry/telemetry/page/__init__.py
@@ -25,8 +25,12 @@ def _UpdateCredentials(credentials_path):
class Page(user_story.UserStory):
def __init__(self, url, page_set=None, base_dir=None, name='',
credentials_path=None, labels=None, startup_url=''):
- super(Page, self).__init__(shared_page_state.SharedPageState, name, labels)
self._url = url
+
+ super(Page, self).__init__(
+ shared_page_state.SharedPageState, name=name, labels=labels,
+ is_local=self._scheme in ['file', 'chrome', 'about'])
+
self._page_set = page_set
# Default value of base_dir is the directory of the file that defines the
# class of this page instance.
@@ -154,11 +158,6 @@ class Page(user_story.UserStory):
return self._scheme == 'file'
@property
- def is_local(self):
- """Returns True iff this URL is local. This includes chrome:// URLs."""
- return self._scheme in ['file', 'chrome', 'about']
-
- @property
def file_path(self):
"""Returns the path of the file, stripping the scheme and query string."""
assert self.is_file
@@ -200,7 +199,3 @@ class Page(user_story.UserStory):
all_urls = [p.url.rstrip('/') for p in self.page_set if p.is_file]
common_prefix = os.path.dirname(os.path.commonprefix(all_urls))
return self.url[len(common_prefix):].strip('/')
-
- @property
- def archive_path(self):
- return self.page_set.WprFilePathForUserStory(self)
« no previous file with comments | « no previous file | tools/telemetry/telemetry/page/page_set.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698