Commit b055c2f9 authored by nednguyen@google.com's avatar nednguyen@google.com

Remove support for specifying page_set attribute with file_path in benchmarks.

All benchmarks that uses the old format have been converted.

https://code.google.com/p/chromium/codesearch#search/&type=cs&sq=package:chromium&q=%22page_test%20=%20'%22%20

https://code.google.com/p/chromium/codesearch#search/&type=cs&sq=package:chromium&q=%22page_test%20=%20%5C%22%22

BUG=362293

Review URL: https://codereview.chromium.org/331213003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278353 0039d316-1c4b-4281-b951-d872f2087c98
parent 9e72cc60
...@@ -38,11 +38,7 @@ class Test(command_line.Command): ...@@ -38,11 +38,7 @@ class Test(command_line.Command):
if hasattr(cls, 'tag'): if hasattr(cls, 'tag'):
name += '.' + cls.tag name += '.' + cls.tag
if hasattr(cls, 'page_set'): if hasattr(cls, 'page_set'):
if isinstance(cls.page_set, basestring): name += '.' + cls.page_set.Name()
# TODO(dtu): Remove this code path after crbug.com/362293.
name += '.' + os.path.basename(os.path.splitext(cls.page_set)[0])
else:
name += '.' + cls.page_set.Name()
return name return name
@classmethod @classmethod
...@@ -186,14 +182,7 @@ class Test(command_line.Command): ...@@ -186,14 +182,7 @@ class Test(command_line.Command):
By default, it will create a page set from the file at this test's By default, it will create a page set from the file at this test's
page_set attribute. Override to generate a custom page set. page_set attribute. Override to generate a custom page set.
""" """
if not hasattr(cls, 'page_set'): return cls.PageSetClass()()
raise NotImplementedError('This test has no "page_set" attribute.')
if isinstance(cls.page_set, basestring):
# TODO(dtu): Remove this code path after crbug.com/362293.
return page_set.PageSet.FromFile(
file_path=os.path.join(util.GetBaseDir(), cls.page_set))
else:
return cls.PageSetClass()()
@classmethod @classmethod
def CreateExpectations(cls, ps): # pylint: disable=W0613 def CreateExpectations(cls, ps): # pylint: disable=W0613
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment