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

Unified Diff: tools/perf/benchmarks/system_health_unittest.py

Issue 2924163005: [system_health] Fix the lack of memory dump triggers on some user stories (Closed)
Patch Set: Created 3 years, 6 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/perf/page_sets/system_health/media_stories.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/benchmarks/system_health_unittest.py
diff --git a/tools/perf/benchmarks/system_health_unittest.py b/tools/perf/benchmarks/system_health_unittest.py
index 9efdfc02eaa0142615856f1d9233f2bb4563f578..97ecd53b587ff06e6a5b35ae003399f659b81137 100644
--- a/tools/perf/benchmarks/system_health_unittest.py
+++ b/tools/perf/benchmarks/system_health_unittest.py
@@ -8,6 +8,7 @@ import unittest
from benchmarks import system_health as system_health_benchmark
from core import path_util
from page_sets.system_health import system_health_stories
+from page_sets.system_health import system_health_story
from telemetry import benchmark as benchmark_module
from telemetry.core import discover
@@ -44,3 +45,21 @@ class TestSystemHealthBenchmarks(unittest.TestCase):
b().CreateStorySet(None),
system_health_stories.SystemHealthStorySet,
'%r does not use SystemHealthStorySet' % b)
+
+
+class TestSystemHealthStories(unittest.TestCase):
+
+ def testNoOverrideRunPageInteractions(self):
+ desktop_stories = (
+ system_health_stories.DesktopSystemHealthStorySet().stories)
+ mobile_stories = (
+ system_health_stories.MobileSystemHealthStorySet().stories)
+ for s in desktop_stories + mobile_stories:
+ # Long running stories has their own way of collecting memory dumps,
+ # so they explicitly override RunPageInteractions method.
+ if s.name.startswith('long_running:'):
+ continue
+ self.assertEquals(s.__class__.RunPageInteractions,
+ system_health_story.SystemHealthStory.RunPageInteractions,
+ 'Story %s overrides RunPageInteractions. Override _DidLoadDocument '
+ 'instead' % s.name)
« no previous file with comments | « no previous file | tools/perf/page_sets/system_health/media_stories.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698