Commit b91e7865 authored by nednguyen's avatar nednguyen Committed by Commit bot

Remove page_set argument from benchmark.CreateExpectations to limit the access...

Remove page_set argument from benchmark.CreateExpectations to limit the access to page_set (user_story)

BUG=418278

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

Cr-Commit-Position: refs/heads/master@{#297267}
parent 489a9778
...@@ -317,7 +317,7 @@ class ContextLost(benchmark_module.Benchmark): ...@@ -317,7 +317,7 @@ class ContextLost(benchmark_module.Benchmark):
enabled = True enabled = True
test = _ContextLostValidator test = _ContextLostValidator
def CreateExpectations(self, page_set): def CreateExpectations(self):
return context_lost_expectations.ContextLostExpectations() return context_lost_expectations.ContextLostExpectations()
# For the record, this would have been another way to get the pages # For the record, this would have been another way to get the pages
......
...@@ -37,7 +37,7 @@ class GpuProcess(benchmark.Benchmark): ...@@ -37,7 +37,7 @@ class GpuProcess(benchmark.Benchmark):
"""Tests that accelerated content triggers the creation of a GPU process""" """Tests that accelerated content triggers the creation of a GPU process"""
test = _GpuProcessValidator test = _GpuProcessValidator
def CreateExpectations(self, page_set): def CreateExpectations(self):
return expectations.GpuProcessExpectations() return expectations.GpuProcessExpectations()
def CreatePageSet(self, options): def CreatePageSet(self, options):
......
...@@ -49,7 +49,7 @@ class HardwareAcceleratedFeature(benchmark.Benchmark): ...@@ -49,7 +49,7 @@ class HardwareAcceleratedFeature(benchmark.Benchmark):
"""Tests GPU acceleration is reported as active for various features""" """Tests GPU acceleration is reported as active for various features"""
test = _HardwareAcceleratedFeatureValidator test = _HardwareAcceleratedFeatureValidator
def CreateExpectations(self, page_set): def CreateExpectations(self):
return expectations.HardwareAcceleratedFeatureExpectations() return expectations.HardwareAcceleratedFeatureExpectations()
def CreatePageSet(self, options): def CreatePageSet(self, options):
......
...@@ -90,7 +90,7 @@ class Maps(cloud_storage_test_base.TestBase): ...@@ -90,7 +90,7 @@ class Maps(cloud_storage_test_base.TestBase):
"""Google Maps pixel tests.""" """Google Maps pixel tests."""
test = _MapsValidator test = _MapsValidator
def CreateExpectations(self, page_set): def CreateExpectations(self):
return maps_expectations.MapsExpectations() return maps_expectations.MapsExpectations()
def CreatePageSet(self, options): def CreatePageSet(self, options):
......
...@@ -103,7 +103,7 @@ class MemoryTest(benchmark.Benchmark): ...@@ -103,7 +103,7 @@ class MemoryTest(benchmark.Benchmark):
"""Tests GPU memory limits""" """Tests GPU memory limits"""
test = _MemoryValidator test = _MemoryValidator
def CreateExpectations(self, page_set): def CreateExpectations(self):
return memory_test_expectations.MemoryTestExpectations() return memory_test_expectations.MemoryTestExpectations()
def CreatePageSet(self, options): def CreatePageSet(self, options):
......
...@@ -163,5 +163,5 @@ class Pixel(cloud_storage_test_base.TestBase): ...@@ -163,5 +163,5 @@ class Pixel(cloud_storage_test_base.TestBase):
page.script_to_evaluate_on_commit = test_harness_script page.script_to_evaluate_on_commit = test_harness_script
return page_set return page_set
def CreateExpectations(self, page_set): def CreateExpectations(self):
return pixel_expectations.PixelExpectations() return pixel_expectations.PixelExpectations()
...@@ -48,7 +48,7 @@ class ScreenshotSyncProcess(benchmark.Benchmark): ...@@ -48,7 +48,7 @@ class ScreenshotSyncProcess(benchmark.Benchmark):
they were requested""" they were requested"""
test = _ScreenshotSyncValidator test = _ScreenshotSyncValidator
def CreateExpectations(self, page_set): def CreateExpectations(self):
return expectations.ScreenshotSyncExpectations() return expectations.ScreenshotSyncExpectations()
def CreatePageSet(self, options): def CreatePageSet(self, options):
......
...@@ -119,7 +119,7 @@ class WebglConformance(benchmark_module.Benchmark): ...@@ -119,7 +119,7 @@ class WebglConformance(benchmark_module.Benchmark):
return ps return ps
def CreateExpectations(self, page_set): def CreateExpectations(self):
return webgl_conformance_expectations.WebGLConformanceExpectations() return webgl_conformance_expectations.WebGLConformanceExpectations()
@staticmethod @staticmethod
......
...@@ -85,7 +85,7 @@ class Benchmark(command_line.Command): ...@@ -85,7 +85,7 @@ class Benchmark(command_line.Command):
pt._enabled_strings = self._enabled_strings pt._enabled_strings = self._enabled_strings
ps = self.CreatePageSet(finder_options) ps = self.CreatePageSet(finder_options)
expectations = self.CreateExpectations(ps) expectations = self.CreateExpectations()
self._DownloadGeneratedProfileArchive(finder_options) self._DownloadGeneratedProfileArchive(finder_options)
...@@ -196,7 +196,7 @@ class Benchmark(command_line.Command): ...@@ -196,7 +196,7 @@ class Benchmark(command_line.Command):
return cls.PageSetClass()() return cls.PageSetClass()()
@classmethod @classmethod
def CreateExpectations(cls, ps): # pylint: disable=W0613 def CreateExpectations(cls): # pylint: disable=W0613
"""Get the expectations this test will run with. """Get the expectations this test will run with.
By default, it will create an empty expectations set. Override to generate By default, it will create an empty expectations set. Override to generate
......
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