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

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

Issue 2994833002: [Telemetry] Change API of ShouldStopBrowserAfterStoryRun (Closed)
Patch Set: Created 3 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/page/shared_page_state.py
diff --git a/telemetry/telemetry/page/shared_page_state.py b/telemetry/telemetry/page/shared_page_state.py
index d36985959a9c9a4dda554f9e3f6bd319c3e326bf..ab0250176801870b0f910f6d9f5eaae063745dd6 100644
--- a/telemetry/telemetry/page/shared_page_state.py
+++ b/telemetry/telemetry/page/shared_page_state.py
@@ -17,7 +17,7 @@ from telemetry.internal.util import file_handle
from telemetry.page import cache_temperature
from telemetry.page import traffic_setting
from telemetry.page import legacy_page_test
-from telemetry import story
+from telemetry import story as story_module
from telemetry.util import screenshot
from telemetry.util import wpr_modes
from telemetry.web_perf import timeline_based_measurement
@@ -35,7 +35,7 @@ def _PrepareFinderOptions(finder_options, test, device_type):
finder_options)
-class SharedPageState(story.SharedState):
+class SharedPageState(story_module.SharedState):
"""
This class contains all specific logic necessary to run a Chrome browser
benchmark.
@@ -164,14 +164,15 @@ class SharedPageState(story.SharedState):
if self._current_page.credentials and self._did_login_for_current_page:
self.browser.credentials.LoginNoLongerNeeded(
self._current_tab, self._current_page.credentials)
- if self.ShouldStopBrowserAfterStoryRun():
+ if self.ShouldStopBrowserAfterStoryRun(self._current_page):
self._StopBrowser()
self._current_page = None
self._current_tab = None
- def ShouldStopBrowserAfterStoryRun(self):
+ def ShouldStopBrowserAfterStoryRun(self, story):
# TODO(crbug.com/748566): Provide a suitable implementation when not made
# redundant by the current tear down state after each story behavior.
+ del story
return False
@property
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698