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

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

Issue 259763003: Get rid of PageSet.FromDict from some simple benchmarks in gpu_tests/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 8 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 | « content/test/gpu/gpu_tests/webgl_robustness.py ('k') | 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/page.py
diff --git a/tools/telemetry/telemetry/page/page.py b/tools/telemetry/telemetry/page/page.py
index 0eeb9677404e777502052ab12aacaa38ed964bba..344175abea8ecd218b3c7239ee58fa8f43ba5a5d 100644
--- a/tools/telemetry/telemetry/page/page.py
+++ b/tools/telemetry/telemetry/page/page.py
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import inspect
import os
import re
import urlparse
@@ -13,6 +14,10 @@ class Page(object):
def __init__(self, url, page_set=None, base_dir=None):
self.url = url
self._page_set = page_set
+ # Default value of base_dir is the directory of the file that defines the
+ # class of this page instace.
+ if base_dir is None:
+ base_dir = os.path.dirname(inspect.getfile(self.__class__))
self._base_dir = base_dir
# These attributes can be set dynamically by the page.
« no previous file with comments | « content/test/gpu/gpu_tests/webgl_robustness.py ('k') | tools/telemetry/telemetry/page/page_set.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698