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

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

Issue 2998773002: [Telemetry] Reuse shared state between story runs (Closed)
Patch Set: fix unittest 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 | « telemetry/telemetry/page/page_run_end_to_end_unittest.py ('k') | 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 ab0250176801870b0f910f6d9f5eaae063745dd6..292e2149fdfbd00ad459d8768505e41f989b8001 100644
--- a/telemetry/telemetry/page/shared_page_state.py
+++ b/telemetry/telemetry/page/shared_page_state.py
@@ -170,10 +170,16 @@ class SharedPageState(story_module.SharedState):
self._current_tab = None
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.
+ """Specify whether the browser should be closed after running a story.
+
+ Defaults to always closing the browser on all platforms to help keeping
+ story runs independent of each other; except on ChromeOS where restarting
+ the browser is expensive.
+
+ Subclasses may override this method to change this behavior.
+ """
del story
- return False
+ return self.platform.GetOSName() != 'chromeos'
@property
def platform(self):
« no previous file with comments | « telemetry/telemetry/page/page_run_end_to_end_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698