Commit b79c1e08 authored by Amy Qiu's avatar Amy Qiu Committed by Commit Bot

Merge tough_filters_cases page set into rendering page sets

Move tough_filters_cases into rendering folder and refactor to inherit
from RenderingStory base class. Rename page sets so that formats are
consistent.

Bug: 760553
Change-Id: Ib3bb5f7f41afaa22d9f7a23d83ec140803a076d7
Reviewed-on: https://chromium-review.googlesource.com/1076318
Commit-Queue: Amy Qiu <amyqiu@google.com>
Reviewed-by: default avatarNed Nguyen <nednguyen@google.com>
Cr-Commit-Position: refs/heads/master@{#562511}
parent 7863a559
......@@ -83,6 +83,18 @@
},
"gmail_move": {
"DEFAULT": "key_desktop_move_cases_002.wprgo"
},
"filter_terrain_svg": {
"DEFAULT": "tough_filters_cases_002.wprgo"
},
"motion_mark_focus": {
"DEFAULT": "tough_filters_cases_002.wprgo"
},
"analog_clock_svg": {
"DEFAULT": "tough_filters_cases_002.wprgo"
},
"ie_pirate_mark": {
"DEFAULT": "tough_filters_cases_002.wprgo"
}
},
"description": "Describes the Web Page Replay archives for a story set. Don't edit by hand! Use record_wpr for updating.",
......
......@@ -431,6 +431,18 @@
},
"google_image_search_desktop_gpu_raster": {
"DEFAULT": "top_25_007.wprgo"
},
"filter_terrain_svg": {
"DEFAULT": "tough_filters_cases_002.wprgo"
},
"motion_mark_focus": {
"DEFAULT": "tough_filters_cases_002.wprgo"
},
"analog_clock_svg": {
"DEFAULT": "tough_filters_cases_002.wprgo"
},
"ie_pirate_mark": {
"DEFAULT": "tough_filters_cases_002.wprgo"
}
},
"description": "Describes the Web Page Replay archives for a story set. Don't edit by hand! Use record_wpr for updating.",
......
......@@ -3,19 +3,19 @@
"http://ie.microsoft.com/testdrive/Performance/Pirates/": {
"DEFAULT": "tough_filters_cases_001.wprgo"
},
"http://letmespellitoutforyou.com/samples/svg/filter_terrain.svg": {
"filter_terrain_svg": {
"DEFAULT": "tough_filters_cases_002.wprgo"
},
"http://rawgit.com/WebKit/webkit/master/PerformanceTests/Animometer/developer.html?test-interval=20&display=minimal&controller=fixed&frame-rate=50&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=Animometer&test-name=Focus&complexity=100": {
"motion_mark_focus": {
"DEFAULT": "tough_filters_cases_002.wprgo"
},
"http://static.bobdo.net/Analog_Clock.svg": {
"analog_clock_svg": {
"DEFAULT": "tough_filters_cases_002.wprgo"
},
"http://web.archive.org/web/20150502135732/http://ie.microsoft.com/testdrive/Performance/Pirates/Default.html": {
"ie_pirate_mark": {
"DEFAULT": "tough_filters_cases_002.wprgo"
}
},
"description": "Describes the Web Page Replay archives for a story set. Don't edit by hand! Use record_wpr for updating.",
"platform_specific": true
}
\ No newline at end of file
}
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import shared_page_state
from telemetry import story
from page_sets.rendering import rendering_story
class ToughFiltersCasesPage(rendering_story.RenderingStory):
ABSTRACT_STORY = True
def __init__(self,
page_set,
shared_page_state_class=shared_page_state.SharedPageState,
name_suffix='',
extra_browser_args=None):
super(ToughFiltersCasesPage, self).__init__(
page_set=page_set,
shared_page_state_class=shared_page_state_class,
name_suffix=name_suffix,
extra_browser_args=extra_browser_args)
def RunPageInteractions(self, action_runner):
with action_runner.CreateInteraction('Filter'):
action_runner.Wait(10)
class MotionMarkPage(ToughFiltersCasesPage):
BASE_NAME = 'motion_mark_focus'
# pylint: disable=line-too-long
URL = 'http://rawgit.com/WebKit/webkit/master/PerformanceTests/Animometer/developer.html?test-interval=20&display=minimal&controller=fixed&frame-rate=50&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=Animometer&test-name=Focus&complexity=100'
class FilterTerrainSVGPage(ToughFiltersCasesPage):
BASE_NAME = 'filter_terrain_svg'
URL = 'http://letmespellitoutforyou.com/samples/svg/filter_terrain.svg'
class AnalogClockSVGPage(ToughFiltersCasesPage):
BASE_NAME = 'analog_clock_svg'
URL = 'http://static.bobdo.net/Analog_Clock.svg'
class PirateMarkPage(rendering_story.RenderingStory):
BASE_NAME = 'ie_pirate_mark'
URL = ('http://web.archive.org/web/20150502135732/'
'http://ie.microsoft.com/testdrive/Performance/'
'Pirates/Default.html')
def __init__(self,
page_set,
shared_page_state_class=shared_page_state.SharedPageState,
name_suffix='',
extra_browser_args=None):
super(PirateMarkPage, self).__init__(
page_set=page_set,
shared_page_state_class=shared_page_state_class,
name_suffix=name_suffix,
extra_browser_args=extra_browser_args)
def RunPageInteractions(self, action_runner):
action_runner.WaitForNetworkQuiescence()
with action_runner.CreateInteraction('Filter'):
action_runner.EvaluateJavaScript(
'document.getElementById("benchmarkButtonText").click()')
action_runner.Wait(10)
# TODO(crbug.com/760553):remove this class after smoothness.tough_filters_cases
# benchmark is completely replaced by rendering benchmarks
class ToughFiltersCasesPageSet(story.StorySet):
"""
Description: Self-driven filters animation examples
"""
def __init__(self):
super(ToughFiltersCasesPageSet, self).__init__(
archive_data_file='../data/tough_filters_cases.json',
cloud_storage_bucket=story.PARTNER_BUCKET)
page_classes = [
MotionMarkPage,
FilterTerrainSVGPage,
AnalogClockSVGPage,
PirateMarkPage
]
for page_class in page_classes:
self.AddStory(page_class(self))
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry import story
class ToughFiltersCasesPage(page_module.Page):
def __init__(self, url, page_set, name):
super(ToughFiltersCasesPage, self).__init__(
url=url, page_set=page_set, name=name)
def RunPageInteractions(self, action_runner):
with action_runner.CreateInteraction('Filter'):
action_runner.Wait(10)
class PirateMarkPage(page_module.Page):
def RunPageInteractions(self, action_runner):
action_runner.WaitForNetworkQuiescence()
with action_runner.CreateInteraction('Filter'):
action_runner.EvaluateJavaScript(
'document.getElementById("benchmarkButtonText").click()')
action_runner.Wait(10)
class ToughFiltersCasesPageSet(story.StorySet):
"""
Description: Self-driven filters animation examples
"""
def __init__(self):
super(ToughFiltersCasesPageSet, self).__init__(
archive_data_file='data/tough_filters_cases.json',
cloud_storage_bucket=story.PARTNER_BUCKET)
urls_list = [
('http://rawgit.com/WebKit/webkit/master/PerformanceTests/Animometer/developer.html?test-interval=20&display=minimal&controller=fixed&frame-rate=50&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=Animometer&test-name=Focus&complexity=100', # pylint: disable=line-too-long
'MotionMark_Focus'),
('http://letmespellitoutforyou.com/samples/svg/filter_terrain.svg',
'Filter_Terrain_SVG'),
('http://static.bobdo.net/Analog_Clock.svg',
'Analog_Clock_SVG'),
]
for url, name in urls_list:
self.AddStory(ToughFiltersCasesPage(url, self, name))
pirate_url = ('http://web.archive.org/web/20150502135732/'
'http://ie.microsoft.com/testdrive/Performance/'
'Pirates/Default.html')
name = 'IE_PirateMark'
self.AddStory(PirateMarkPage(pirate_url, self, name=name))
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