Chromium Code Reviews| Index: tools/perf/page_sets/key_silk_cases.py |
| diff --git a/tools/perf/page_sets/key_silk_cases.py b/tools/perf/page_sets/key_silk_cases.py |
| index 7ed1a72099061783111e1ef1abc1b4402fbcf2fb..a271340b912232fcc7216382dbbd159751a260e6 100644 |
| --- a/tools/perf/page_sets/key_silk_cases.py |
| +++ b/tools/perf/page_sets/key_silk_cases.py |
| @@ -564,6 +564,58 @@ class Page26(KeySilkCasesPage): |
| interaction.End() |
| +class SVGIconRaster(KeySilkCasesPage): |
| + |
| + """ Why: Mutating SVG icons; these paint storm and paint slowly. """ |
| + |
| + def __init__(self, page_set): |
| + super(SVGIconRaster, self).__init__( |
| + url='http://wiltzius.github.io/shape-shifter/', |
|
Sami
2014/07/08 11:18:37
This is from a different patch, right? It's not in
|
| + page_set=page_set) |
| + |
| + def RunNavigateSteps(self, action_runner): |
| + action_runner.NavigateToPage(self) |
| + action_runner.WaitForJavaScriptCondition( |
| + 'loaded = true') |
| + action_runner.Wait(1) |
| + |
| + def RunSmoothness(self, action_runner): |
| + for i in xrange(9): |
| + button_func = ('document.getElementById("demo").$.' |
| + 'buttons.children[%d]') % i |
| + interaction = action_runner.BeginInteraction( |
| + 'Action_TapAction', is_smooth=True) |
| + action_runner.TapElement(element_function=button_func) |
| + action_runner.Wait(1) |
| + interaction.End() |
| + |
| + |
| +class UpdateHistoryState(KeySilkCasesPage): |
| + |
| + """ Why: Modern apps often update history state, which currently is janky.""" |
| + |
| + def __init__(self, page_set): |
| + super(UpdateHistoryState, self).__init__( |
| + url='http://wiltzius.github.io/janky-history-update/index.html', |
| + page_set=page_set) |
| + |
| + def RunNavigateSteps(self, action_runner): |
| + action_runner.NavigateToPage(self) |
| + action_runner.ExecuteJavaScript(''' |
| + window.requestAnimationFrame(function() { |
| + window.__history_state_loaded = true; |
| + }); |
| + ''') |
| + action_runner.WaitForJavaScriptCondition( |
| + 'window.__history_state_loaded == true;') |
| + |
| + def RunSmoothness(self, action_runner): |
| + interaction = action_runner.BeginInteraction('animation_interaction', |
| + is_smooth=True) |
| + action_runner.Wait(5) # JS runs the animation continuously on the page |
| + interaction.End() |
| + |
| + |
| class KeySilkCasesPageSet(page_set_module.PageSet): |
| """ Pages hand-picked for project Silk. """ |
| @@ -601,3 +653,6 @@ class KeySilkCasesPageSet(page_set_module.PageSet): |
| self.AddPage(Page24(self)) |
| self.AddPage(Page25(self)) |
| self.AddPage(Page26(self)) |
| + self.AddPage(SVGIconRaster(self)) |
| + self.AddPage(UpdateHistoryState(self)) |
| + |