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

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

Issue 616693002: Kill page.disabled field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 | « tools/telemetry/telemetry/page/page_runner.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 51c8a99c341ce08265c6a5ca0a5b0b2de23e4f9c..bfe86e08f6bc6ba9f0dd2d654128c47fe8af5403 100644
--- a/tools/telemetry/telemetry/unittest/page_set_smoke_test.py
+++ b/tools/telemetry/telemetry/unittest/page_set_smoke_test.py
@@ -53,14 +53,14 @@ class PageSetSmokeTest(unittest.TestCase):
except browser_credentials.CredentialsError:
self.fail(fail_message)
- def CheckTypes(self, page_set):
+ def CheckAttributes(self, page_set):
"""Verify that page_set and its page's base attributes have the right types.
"""
- self.CheckTypesOfPageSetBasicAttributes(page_set)
+ self.CheckAttributesOfPageSetBasicAttributes(page_set)
for page in page_set.pages:
- self.CheckTypesOfPageBasicAttributes(page)
+ self.CheckAttributesOfPageBasicAttributes(page)
- def CheckTypesOfPageSetBasicAttributes(self, page_set):
+ def CheckAttributesOfPageSetBasicAttributes(self, page_set):
if page_set.file_path is not None:
self.assertTrue(
isinstance(page_set.file_path, str),
@@ -83,7 +83,8 @@ class PageSetSmokeTest(unittest.TestCase):
isinstance(page_set.startup_url, str),
msg='page_set\'s startup_url must have type string')
- def CheckTypesOfPageBasicAttributes(self, page):
+ def CheckAttributesOfPageBasicAttributes(self, page):
+ self.assertTrue(not hasattr(page, 'disabled'))
self.assertTrue(
isinstance(page.url, str),
msg='page %s \'s url must have type string' % page.display_name)
@@ -104,8 +105,11 @@ class PageSetSmokeTest(unittest.TestCase):
page_sets = discover.DiscoverClasses(page_sets_dir, top_level_dir,
page_set_module.PageSet).values()
for page_set_class in page_sets:
- page_set = page_set_class()
+ try:
+ page_set = page_set_class()
+ except TypeError:
+ continue
logging.info('Testing %s', page_set.file_path)
self.CheckArchive(page_set)
self.CheckCredentials(page_set)
- self.CheckTypes(page_set)
+ self.CheckAttributes(page_set)
« no previous file with comments | « tools/telemetry/telemetry/page/page_runner.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698