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

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

Issue 625123002: Make credential_path a page attribute instead of page_set attribute. (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 bfe86e08f6bc6ba9f0dd2d654128c47fe8af5403..83ab529c9973774e75b4abe71d43e558f2d319b9 100644
--- a/tools/telemetry/telemetry/unittest/page_set_smoke_test.py
+++ b/tools/telemetry/telemetry/unittest/page_set_smoke_test.py
@@ -10,6 +10,7 @@ from telemetry.core import browser_credentials
from telemetry.core import discover
from telemetry.page import page_set as page_set_module
from telemetry.page import page_set_archive_info
+from telemetry.util import classes
class PageSetSmokeTest(unittest.TestCase):
@@ -40,11 +41,11 @@ class PageSetSmokeTest(unittest.TestCase):
def CheckCredentials(self, page_set):
"""Verify that all pages in page_set use proper credentials"""
- credentials = browser_credentials.BrowserCredentials()
- if page_set.credentials_path:
- credentials.credentials_path = (
- os.path.join(page_set.base_dir, page_set.credentials_path))
for page in page_set.pages:
+ credentials = browser_credentials.BrowserCredentials()
+ if page.credentials_path:
+ credentials.credentials_path = (
+ os.path.join(page.base_dir, page.credentials_path))
fail_message = ('page %s of %s has invalid credentials %s' %
(page.url, page_set.file_path, page.credentials))
if page.credentials:
@@ -108,6 +109,8 @@ class PageSetSmokeTest(unittest.TestCase):
try:
page_set = page_set_class()
except TypeError:
dtu 2014/10/06 21:30:22 What is this except block for in the first place?
nednguyen 2014/10/07 20:11:09 There are some page_set that aren't directly const
dtu 2014/10/08 21:34:18 Interesting, okay.
+ if classes.IsDirectlyConstructable(page_set_class):
+ raise
continue
logging.info('Testing %s', page_set.file_path)
self.CheckArchive(page_set)

Powered by Google App Engine
This is Rietveld 408576698