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

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

Issue 1012483002: Remove action_name_to_run field (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | tools/telemetry/telemetry/page/record_wpr.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/page/page_test.py
diff --git a/tools/telemetry/telemetry/page/page_test.py b/tools/telemetry/telemetry/page/page_test.py
index 59104860aec1002ee2ce1ecaa261b7f753020cff..8e297d14447a791028c4a167d66f16405b5ffb43 100644
--- a/tools/telemetry/telemetry/page/page_test.py
+++ b/tools/telemetry/telemetry/page/page_test.py
@@ -43,24 +43,17 @@ class PageTest(object):
page, 'body_children', 'count', body_child_count))
Args:
- action_name_to_run: This is the method name in telemetry.page.Page
- subclasses to run.
discard_first_run: Discard the first run of this page. This is
usually used with page_repeat and pageset_repeat options.
"""
def __init__(self,
- action_name_to_run='RunPageInteractions',
needs_browser_restart_after_each_page=False,
discard_first_result=False,
clear_cache_before_each_run=False):
super(PageTest, self).__init__()
self.options = None
- assert action_name_to_run == 'RunPageInteractions', (
- 'action_name_to_run can only be \'RunPageInteractions\', see '
- 'crbug.com/418375')
- self._action_name_to_run = action_name_to_run
self._needs_browser_restart_after_each_page = (
needs_browser_restart_after_each_page)
self._discard_first_result = discard_first_result
@@ -221,16 +214,10 @@ class PageTest(object):
if interactive:
action_runner.PauseInteractive()
else:
- self._RunMethod(page, self._action_name_to_run, action_runner)
+ page.RunPageInteractions(action_runner)
self.DidRunActions(page, tab)
-
self.ValidateAndMeasurePage(page, tab, results)
- def _RunMethod(self, page, method_name, action_runner):
- if hasattr(page, method_name):
- run_method = getattr(page, method_name)
- run_method(action_runner)
-
def RunNavigateSteps(self, page, tab):
"""Navigates the tab to the page URL attribute.
@@ -239,7 +226,3 @@ class PageTest(object):
action_runner = action_runner_module.ActionRunner(
tab, skip_waits=page.skip_waits)
page.RunNavigateSteps(action_runner)
-
- @property
- def action_name_to_run(self):
- return self._action_name_to_run
« no previous file with comments | « no previous file | tools/telemetry/telemetry/page/record_wpr.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698