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

Side by Side Diff: tools/telemetry/telemetry/unittest_util/page_set_smoke_test.py

Issue 924513004: Revert of Revert of [Telemtry] Move url lists of alexa1-10000 page to a json file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « tools/perf/page_sets/alexa1-10000-urls.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import os 6 import os
7 import unittest 7 import unittest
8 8
9 from telemetry.core import browser_credentials 9 from telemetry.core import browser_credentials
10 from telemetry.core import discover 10 from telemetry.core import discover
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 msg='page_set\'s archive_data_file path must have type string') 96 msg='page_set\'s archive_data_file path must have type string')
97 97
98 if page_set.user_agent_type is not None: 98 if page_set.user_agent_type is not None:
99 self.assertTrue( 99 self.assertTrue(
100 isinstance(page_set.user_agent_type, str), 100 isinstance(page_set.user_agent_type, str),
101 msg='page_set\'s user_agent_type must have type string') 101 msg='page_set\'s user_agent_type must have type string')
102 102
103 def CheckAttributesOfPageBasicAttributes(self, page): 103 def CheckAttributesOfPageBasicAttributes(self, page):
104 self.assertTrue(not hasattr(page, 'disabled')) 104 self.assertTrue(not hasattr(page, 'disabled'))
105 self.assertTrue( 105 self.assertTrue(
106 isinstance(page.url, str), 106 isinstance(page.url, basestring),
107 msg='page %s \'s url must have type string' % page.display_name) 107 msg='page %s \'s url must have type string' % page.display_name)
108 self.assertTrue( 108 self.assertTrue(
109 isinstance(page.page_set, page_set_module.PageSet), 109 isinstance(page.page_set, page_set_module.PageSet),
110 msg='page %s \'s page_set must be an instance of ' 110 msg='page %s \'s page_set must be an instance of '
111 'telemetry.page.page_set.PageSet' % page.display_name) 111 'telemetry.page.page_set.PageSet' % page.display_name)
112 self.assertTrue( 112 self.assertTrue(
113 isinstance(page.name, str), 113 isinstance(page.name, str),
114 msg='page %s \'s name field must have type string' % page.display_name) 114 msg='page %s \'s name field must have type string' % page.display_name)
115 self.assertTrue( 115 self.assertTrue(
116 isinstance(page.labels, set), 116 isinstance(page.labels, set),
(...skipping 24 matching lines...) Expand all
141 if not classes.IsDirectlyConstructable(page_set_class): 141 if not classes.IsDirectlyConstructable(page_set_class):
142 # We can't test page sets that aren't directly constructable since we 142 # We can't test page sets that aren't directly constructable since we
143 # don't know what arguments to put for the constructor. 143 # don't know what arguments to put for the constructor.
144 continue 144 continue
145 page_set = page_set_class() 145 page_set = page_set_class()
146 logging.info('Testing %s', page_set.file_path) 146 logging.info('Testing %s', page_set.file_path)
147 self.CheckArchive(page_set) 147 self.CheckArchive(page_set)
148 self.CheckCredentials(page_set) 148 self.CheckCredentials(page_set)
149 self.CheckAttributes(page_set) 149 self.CheckAttributes(page_set)
150 self.CheckNoMixedInBetweenLegacyRunMethodsAndRunPageInteractions(page_set) 150 self.CheckNoMixedInBetweenLegacyRunMethodsAndRunPageInteractions(page_set)
OLDNEW
« no previous file with comments | « tools/perf/page_sets/alexa1-10000-urls.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698