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

Unified Diff: tools/telemetry/telemetry/unittest/page_set_smoke_test.py

Issue 632013002: [Telemetry] Replace RunStressMemorey with RunPageInteraction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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
Index: tools/telemetry/telemetry/unittest/page_set_smoke_test.py
diff --git a/tools/telemetry/telemetry/unittest/page_set_smoke_test.py b/tools/telemetry/telemetry/unittest/page_set_smoke_test.py
index 274161b9065833acb5db2fc538d16c1cd8c0fe22..717e8a09be3188fcfeec23a81ff438a79da27e51 100644
--- a/tools/telemetry/telemetry/unittest/page_set_smoke_test.py
+++ b/tools/telemetry/telemetry/unittest/page_set_smoke_test.py
@@ -61,6 +61,30 @@ class PageSetSmokeTest(unittest.TestCase):
for page in page_set.pages:
self.CheckAttributesOfPageBasicAttributes(page)
+ def CheckNoMixedInBetweenLegacyRunMethodsAndRunPageInteractions(
+ self, page_set):
+ # This test is to make sure that page has been converted to use single
+ # RunPageInteractions does not contain legacy run method.
+ # For more context see: crbug.com/418375
+ # TODO(nednguyen, ernstm): remove this test when crbug.com/418375 is marked
+ # fixed.
+ LEGACY_RUN_METHODS = [
+ 'RunMediaMetrics',
+ 'RunNoOp',
+ 'RunRepaint',
+ 'RunPrepareForScreenShot',
+ 'RunSmoothness',
+ 'RunWebrtc'
+ ]
+ for page in page_set.pages:
+ if hasattr(page, 'RunPageInteractions'):
+ for legacy_run_method in LEGACY_RUN_METHODS:
+ self.assertTrue(
+ not hasattr(page, legacy_run_method),
+ msg=('page %s in page_set %s has both legacy Run.. methods and '
+ 'RunPageInteractions defined. ' % (
+ page, page_set.file_path)))
+
def CheckAttributesOfPageSetBasicAttributes(self, page_set):
if page_set.file_path is not None:
self.assertTrue(
@@ -115,3 +139,4 @@ class PageSetSmokeTest(unittest.TestCase):
self.CheckArchive(page_set)
self.CheckCredentials(page_set)
self.CheckAttributes(page_set)
+ self.CheckNoMixedInBetweenLegacyRunMethodsAndRunPageInteractions(page_set)
« tools/perf/measurements/memory.py ('K') | « tools/perf/page_sets/tough_dom_memory_cases.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698