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

Side by Side Diff: tools/perf/page_sets/key_silk_cases.py

Issue 367283002: Add SVG icon example to key_silk_cases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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/data/key_silk_cases_016.wpr.sha1 ('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 # pylint: disable=W0401,W0614 4 # pylint: disable=W0401,W0614
5 from telemetry.page.actions.all_page_actions import * 5 from telemetry.page.actions.all_page_actions import *
6 from telemetry.page import page as page_module 6 from telemetry.page import page as page_module
7 from telemetry.page import page_set as page_set_module 7 from telemetry.page import page_set as page_set_module
8 8
9 9
10 class KeySilkCasesPage(page_module.Page): 10 class KeySilkCasesPage(page_module.Page):
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 'document.getElementsByClassName("tweet").length > 0') 557 'document.getElementsByClassName("tweet").length > 0')
558 action_runner.Wait(1) 558 action_runner.Wait(1)
559 559
560 def RunSmoothness(self, action_runner): 560 def RunSmoothness(self, action_runner):
561 interaction = action_runner.BeginGestureInteraction( 561 interaction = action_runner.BeginGestureInteraction(
562 'ScrollAction', is_smooth=True) 562 'ScrollAction', is_smooth=True)
563 action_runner.ScrollPage(distance=5000) 563 action_runner.ScrollPage(distance=5000)
564 interaction.End() 564 interaction.End()
565 565
566 566
567 class Page27(KeySilkCasesPage):
dtu 2014/07/07 22:51:52 nit: think we'd like to start giving these useful
wiltzius 2014/07/08 04:20:56 Done.
568
569 """ Why: Mutating SVG icons; these paint storm and paint slowly. """
570
571 def __init__(self, page_set):
572 super(Page27, self).__init__(
573 url='http://wiltzius.github.io/shape-shifter/',
574 page_set=page_set)
575
576 def RunNavigateSteps(self, action_runner):
577 action_runner.NavigateToPage(self)
578 action_runner.WaitForJavaScriptCondition(
579 'loaded = true')
580 action_runner.Wait(1)
581
582 def RunSmoothness(self, action_runner):
583 for i in range(9):
nednguyen 2014/07/07 18:10:01 nit: maybe xrange(9) instead?
wiltzius 2014/07/08 04:20:56 Done.
584 button_func = ('document.getElementById("demo").$.'
585 'buttons.children[%d]') % i
586 interaction = action_runner.BeginInteraction(
587 'Action_TapAction', is_smooth=True)
588 action_runner.TapElement(element_function=button_func)
589 action_runner.Wait(1)
nduca 2014/07/07 17:12:35 it'd be awesome if, on all the demos that use weba
wiltzius 2014/07/08 04:20:56 Will do for future examples. This one doesn't use
590 interaction.End()
591
567 class KeySilkCasesPageSet(page_set_module.PageSet): 592 class KeySilkCasesPageSet(page_set_module.PageSet):
568 593
569 """ Pages hand-picked for project Silk. """ 594 """ Pages hand-picked for project Silk. """
570 595
571 def __init__(self): 596 def __init__(self):
572 super(KeySilkCasesPageSet, self).__init__( 597 super(KeySilkCasesPageSet, self).__init__(
573 credentials_path='data/credentials.json', 598 credentials_path='data/credentials.json',
574 user_agent_type='mobile', 599 user_agent_type='mobile',
575 archive_data_file='data/key_silk_cases.json', 600 archive_data_file='data/key_silk_cases.json',
576 bucket=page_set_module.PARTNER_BUCKET) 601 bucket=page_set_module.PARTNER_BUCKET)
(...skipping 17 matching lines...) Expand all
594 self.AddPage(Page17(self)) 619 self.AddPage(Page17(self))
595 self.AddPage(Page18(self)) 620 self.AddPage(Page18(self))
596 self.AddPage(Page19(self)) 621 self.AddPage(Page19(self))
597 self.AddPage(Page20(self)) 622 self.AddPage(Page20(self))
598 self.AddPage(Page21(self)) 623 self.AddPage(Page21(self))
599 self.AddPage(Page22(self)) 624 self.AddPage(Page22(self))
600 self.AddPage(Page23(self)) 625 self.AddPage(Page23(self))
601 self.AddPage(Page24(self)) 626 self.AddPage(Page24(self))
602 self.AddPage(Page25(self)) 627 self.AddPage(Page25(self))
603 self.AddPage(Page26(self)) 628 self.AddPage(Page26(self))
629 self.AddPage(Page27(self))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/data/key_silk_cases_016.wpr.sha1 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698