Best Python code snippet using molecule_python
tough_compositor_cases.py
Source:tough_compositor_cases.py  
1# Copyright 2014 The Chromium Authors. All rights reserved.2# Use of this source code is governed by a BSD-style license that can be3# found in the LICENSE file.4from telemetry.page import shared_page_state5from page_sets.rendering import rendering_story6from page_sets.rendering import story_tags7from page_sets.system_health import platforms8class ToughCompositorPage(rendering_story.RenderingStory):9  ABSTRACT_STORY = True10  TAGS = [story_tags.TOUGH_COMPOSITOR]11  def __init__(self,12               page_set,13               shared_page_state_class=shared_page_state.SharedMobilePageState,14               name_suffix='',15               extra_browser_args=None):16    super(ToughCompositorPage, self).__init__(17        page_set=page_set,18        shared_page_state_class=shared_page_state_class,19        name_suffix=name_suffix,20        extra_browser_args=['--report-silk-details', '--disable-top-sites',21                            '--disable-gpu-rasterization'])22  def RunNavigateSteps(self, action_runner):23    super(ToughCompositorPage, self).RunNavigateSteps(action_runner)24    # TODO(epenner): Remove this wait (http://crbug.com/366933)25    action_runner.Wait(5)26class ToughCompositorScrollPage(ToughCompositorPage):27  ABSTRACT_STORY = True28  def RunPageInteractions(self, action_runner):29    # Make the scroll longer to reduce noise.30    with action_runner.CreateGestureInteraction('ScrollAction'):31      action_runner.ScrollPage(direction='down', speed_in_pixels_per_second=300)32# Why: Baseline CC scrolling page. A long page with only text. """33class CCScrollTextPage(ToughCompositorScrollPage):34  BASE_NAME = 'cc_scroll_text_only'35  URL = 'http://jsbin.com/pixavefe/1/quiet?CC_SCROLL_TEXT_ONLY'36# Why: Baseline JS scrolling page. A long page with only text. """37class JSScrollTextPage(ToughCompositorScrollPage):38  BASE_NAME = 'js_scroll_text_only'39  URL = 'http://jsbin.com/dozirar/quiet?JS_SCROLL_TEXT_ONLY'40class ToughCompositorWaitPage(ToughCompositorPage):41  ABSTRACT_STORY = True42  def RunPageInteractions(self, action_runner):43    # We scroll back and forth a few times to reduce noise in the tests.44    with action_runner.CreateInteraction('Animation'):45      action_runner.Wait(8)46# Why: CC Poster circle animates many layers """47class CCPosterCirclePage(ToughCompositorWaitPage):48  BASE_NAME = 'cc_poster_circle'49  URL = 'http://jsbin.com/falefice/1/quiet?CC_POSTER_CIRCLE'50  TAGS = ToughCompositorWaitPage.TAGS + [story_tags.REPRESENTATIVE_WIN_DESKTOP]51# Why: JS poster circle animates/commits many layers """52class JSPosterCirclePage(ToughCompositorWaitPage):53  BASE_NAME = 'js_poster_circle'54  URL = 'http://jsbin.com/giqafofe/1/quiet?JS_POSTER_CIRCLE'55  TAGS = ToughCompositorWaitPage.TAGS + [story_tags.REPRESENTATIVE_WIN_DESKTOP]56# Why: JS invalidation does lots of uploads """57class JSFullScreenPage(ToughCompositorWaitPage):58  BASE_NAME = 'js_full_screen_invalidation'59  URL = 'http://jsbin.com/beqojupo/1/quiet?JS_FULL_SCREEN_INVALIDATION'60# Why: Creates a large number of new tilings """61class NewTilingsPage(ToughCompositorWaitPage):62  BASE_NAME = 'new_tilings'63  URL = 'http://jsbin.com/covoqi/1/quiet?NEW_TILINGS'64  TAGS = ToughCompositorWaitPage.TAGS + [65    story_tags.REPRESENTATIVE_MOBILE,66    story_tags.REPRESENTATIVE_MAC_DESKTOP67  ]68# Why: CSS property update baseline """69class CSSOpacityPlusNLayers0(ToughCompositorWaitPage):70  BASE_NAME = 'css_opacity_plus_n_layers_0'71  SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY72  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'73         'css_opacity_plus_n_layers.html?layer_count=1&visible_layers=1')74# Why: CSS property change on 1 layer with 50%-ile layer count """75class CSSOpacityPlusNLayers50(ToughCompositorWaitPage):76  BASE_NAME = 'css_opacity_plus_n_layers_50'77  SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS78  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'79         'css_opacity_plus_n_layers.html?layer_count=31&visible_layers=10')80# Why: CSS property change on 1 layer with 75%-ile layer count """81class CSSOpacityPlusNLayers75(ToughCompositorWaitPage):82  BASE_NAME = 'css_opacity_plus_n_layers_75'83  SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY84  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'85         'css_opacity_plus_n_layers.html?layer_count=53&visible_layers=16')86# Why: CSS property change on 1 layer with 95%-ile layer count """87class CSSOpacityPlusNLayers95(ToughCompositorWaitPage):88  BASE_NAME = 'css_opacity_plus_n_layers_95'89  SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS90  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'91         'css_opacity_plus_n_layers.html?layer_count=144&visible_layers=29')92# Why: CSS property change on 1 layer with 99%-ile layer count """93class CSSOpacityPlusNLayers99(ToughCompositorWaitPage):94  BASE_NAME = 'css_opacity_plus_n_layers_99'95  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS96  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'97         'css_opacity_plus_n_layers.html?layer_count=306&visible_layers=46')98# Why: JS driven CSS property change on 1 layer baseline """99class JSOpacityPlusNLayers0(ToughCompositorWaitPage):100  BASE_NAME = 'js_opacity_plus_n_layers_0'101  SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY102  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'103         'js_opacity_plus_n_layers.html?layer_count=1&visible_layers=1')104# Why: JS driven property change on 1 layer with 50%-ile layer count """105class JSOpacityPlusNLayers50(ToughCompositorWaitPage):106  BASE_NAME = 'js_opacity_plus_n_layers_50'107  SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS108  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'109         'js_opacity_plus_n_layers.html?layer_count=31&visible_layers=10')110# Why: JS driven property change on 1 layer with 75%-ile layer count """111class JSOpacityPlusNLayers75(ToughCompositorWaitPage):112  BASE_NAME = 'js_opacity_plus_n_layers_75'113  SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY114  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'115         'js_opacity_plus_n_layers.html?layer_count=53&visible_layers=16')116# Why: JS driven property change on 1 layer with 95%-ile layer count """117class JSOpacityPlusNLayers95(ToughCompositorWaitPage):118  BASE_NAME = 'js_opacity_plus_n_layers_95'119  SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS120  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'121         'js_opacity_plus_n_layers.html?layer_count=144&visible_layers=29')122# Why: JS driven property update with 99%-ile layer count """123class JSOpacityPlusNLayers99(ToughCompositorWaitPage):124  BASE_NAME = 'js_opacity_plus_n_layers_99'125  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS126  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'127         'js_opacity_plus_n_layers.html?layer_count=306&visible_layers=46')128# Why: Painting 1 layer baseline """129class JSPaintPlusNLayers0(ToughCompositorWaitPage):130  BASE_NAME = 'js_paint_plus_n_layers_0'131  SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY132  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'133         'js_paint_plus_n_layers.html?layer_count=1&visible_layers=1')134# Why: Painting 1 layer with 50%-ile layer count"""135class JSPaintPlusNLayers50(ToughCompositorWaitPage):136  BASE_NAME = 'js_paint_plus_n_layers_50'137  SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS138  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'139         'js_paint_plus_n_layers.html?layer_count=31&visible_layers=10')140# Why: Painting 1 layer with 75%-ile layer count"""141class JSPaintPlusNLayers75(ToughCompositorWaitPage):142  BASE_NAME = 'js_paint_plus_n_layers_75'143  SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY144  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'145         'js_paint_plus_n_layers.html?layer_count=53&visible_layers=16')146# Why: Painting 1 layer with 95%-ile layer count"""147class JSPaintPlusNLayers95(ToughCompositorWaitPage):148  BASE_NAME = 'js_paint_plus_n_layers_95'149  SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS150  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'151         'js_paint_plus_n_layers.html?layer_count=144&visible_layers=29')152# Why: Painting 1 layer with 99%-ile layer count"""153class JSPaintPlusNLayers99(ToughCompositorWaitPage):154  BASE_NAME = 'js_paint_plus_n_layers_99'155  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS156  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'157         'js_paint_plus_n_layers.html?layer_count=306&visible_layers=46')158class InfiniteScrollElementNLayersPage(ToughCompositorPage):159  ABSTRACT_STORY = True160  def RunPageInteractions(self, action_runner):161    with action_runner.CreateGestureInteraction('ScrollAction'):162      action_runner.ScrollElement(163          selector='#container', speed_in_pixels_per_second=1000)164# Why: Infinite non-root scroller with 1 layer baseline"""165class InfiniteScrollElementNLayers0(InfiniteScrollElementNLayersPage):166  BASE_NAME = 'infinite_scroll_element_n_layers_0'167  SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY168  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'169         'infinite_scroll_element_n_layers.html?layer_count=1')170# Why: Infinite non-root scroller with 50%-ile layer count"""171class InfiniteScrollElementNLayers50(InfiniteScrollElementNLayersPage):172  BASE_NAME = 'infinite_scroll_element_n_layers_50'173  SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS174  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'175         'infinite_scroll_element_n_layers.html?layer_count=31')176# Why: Infinite non-root scroller with 75%-ile layer count"""177class InfiniteScrollElementNLayers75(InfiniteScrollElementNLayersPage):178  BASE_NAME = 'infinite_scroll_element_n_layers_75'179  SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY180  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'181         'infinite_scroll_element_n_layers.html?layer_count=53')182# Why: Infinite non-root scroller with 95%-ile layer count"""183class InfiniteScrollElementNLayers95(InfiniteScrollElementNLayersPage):184  BASE_NAME = 'infinite_scroll_element_n_layers_95'185  SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS186  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'187         'infinite_scroll_element_n_layers.html?layer_count=144')188# Why: Infinite non-root scroller with 99%-ile layer count"""189class InfiniteScrollElementNLayers99(InfiniteScrollElementNLayersPage):190  BASE_NAME = 'infinite_scroll_element_n_layers_99'191  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS192  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'193         'infinite_scroll_element_n_layers.html?layer_count=306')194class InfiniteScrollRootNLayersPage(ToughCompositorPage):195  ABSTRACT_STORY = True196  def RunPageInteractions(self, action_runner):197    with action_runner.CreateGestureInteraction('ScrollAction'):198      action_runner.ScrollPage(direction='down',199                               speed_in_pixels_per_second=1000)200# Why: Infinite root scroller with 1 layer baseline """201class InfiniteScrollRootNLayers0(InfiniteScrollRootNLayersPage):202  BASE_NAME = 'infinite_scroll_root_n_layers_0'203  SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY204  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'205         'infinite_scroll_root_n_layers.html?layer_count=1')206# Why: Infinite root scroller with 50%-ile layer count"""207class InfiniteScrollRootNLayers50(InfiniteScrollRootNLayersPage):208  BASE_NAME = 'infinite_scroll_root_n_layers_50'209  SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS210  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'211         'infinite_scroll_root_n_layers.html?layer_count=31')212# Why: Infinite root scroller with 75%-ile layer count"""213class InfiniteScrollRootNLayers75(InfiniteScrollRootNLayersPage):214  BASE_NAME = 'infinite_scroll_root_n_layers_75'215  SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY216  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'217         'infinite_scroll_root_n_layers.html?layer_count=53')218# Why: Infinite root scroller with 95%-ile layer count"""219class InfiniteScrollRootNLayers95(InfiniteScrollRootNLayersPage):220  BASE_NAME = 'infinite_scroll_root_n_layers_95'221  SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS222  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'223         'infinite_scroll_root_n_layers.html?layer_count=144')224# Why: Infinite root scroller with 99%-ile layer count"""225class InfiniteScrollRootNLayers99(InfiniteScrollRootNLayersPage):226  BASE_NAME = 'infinite_scroll_root_n_layers_99'227  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS228  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'229         'infinite_scroll_root_n_layers.html?layer_count=306')230# Why: Infinite root scroller + fixed element, with 1 layer baseline """231class InfiniteScrollRootFixedNLayers0(InfiniteScrollRootNLayersPage):232  BASE_NAME = 'infinite_scroll_root_fixed_n_layers_0'233  SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY234  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'235         'infinite_scroll_root_fixed_n_layers.html?layer_count=1')236# Why: Infinite root scroller + fixed element, with 50%-ile layer count"""237class InfiniteScrollRootFixedNLayers50(InfiniteScrollRootNLayersPage):238  BASE_NAME = 'infinite_scroll_root_fixed_n_layers_50'239  SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS240  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'241         'infinite_scroll_root_fixed_n_layers.html?layer_count=31')242# Why: Infinite root scroller + fixed element, with 75%-ile layer count"""243class InfiniteScrollRootFixedNLayers75(InfiniteScrollRootNLayersPage):244  BASE_NAME = 'infinite_scroll_root_fixed_n_layers_75'245  SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY246  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'247         'infinite_scroll_root_fixed_n_layers.html?layer_count=53')248# Why: Infinite root scroller + fixed element, with 95%-ile layer count"""249class InfiniteScrollRootFixedNLayers95(InfiniteScrollRootNLayersPage):250  BASE_NAME = 'infinite_scroll_root_fixed_n_layers_95'251  SUPPORTED_PLATFORMS = platforms.NO_PLATFORMS252  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'253         'infinite_scroll_root_fixed_n_layers.html?layer_count=144')254# Why: Infinite root scroller + fixed element, with 99%-ile layer count"""255class InfiniteScrollRootFixedNLayers99(InfiniteScrollRootNLayersPage):256  BASE_NAME = 'infinite_scroll_root_fixed_n_layers_99'257  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS258  URL = ('file://../../../../chrome/test/data/perf/tough_compositor_cases/'...throughput_test_cases.py
Source:throughput_test_cases.py  
1# Copyright 2019 The Chromium Authors. All rights reserved.2# Use of this source code is governed by a BSD-style license that can be3# found in the LICENSE file.4from page_sets.rendering import rendering_story5from page_sets.rendering import story_tags6from page_sets.system_health import platforms7class ThroughputMetricStory(rendering_story.RenderingStory):8  ABSTRACT_STORY = True9  TAGS = [story_tags.THROUGHPUT_TEST]10  def RunPageInteractions(self, action_runner):11    with action_runner.CreateGestureInteraction('AnimationOnTap'):12      action_runner.PressKey(' ')13      action_runner.Wait(10)14      action_runner.PressKey(' ')15class MainZeroImplSixty(ThroughputMetricStory):16  BASE_NAME = 'main_0fps_impl_60fps'17  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS18  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'19         'main-impl-animations-throughput.html')20class MainZeroImplSixtyNoUpdate(ThroughputMetricStory):21  BASE_NAME = 'main_0fps_impl_60fps_no_update'22  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS23  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'24         'main-impl-animations-no-update-throughput.html')25class MainZeroImplSixtyNoUpdateJank(ThroughputMetricStory):26  BASE_NAME = 'main_0fps_impl_60fps_no_update_jank'27  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS28  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'29         'main-impl-animations-no-update-throughput.html?jank')30class MainThirtyImplSixty(ThroughputMetricStory):31  BASE_NAME = 'main_30fps_impl_60fps'32  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS33  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'34         'main-impl-animations-throughput.html#30')35  TAGS = ThroughputMetricStory.TAGS + [36    story_tags.REPRESENTATIVE_MOBILE,37    story_tags.REPRESENTATIVE_MAC_DESKTOP,38    story_tags.REPRESENTATIVE_WIN_DESKTOP39  ]40class MainSixtyImplSixty(ThroughputMetricStory):41  BASE_NAME = 'main_60fps_impl_60fps'42  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS43  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'44         'main-impl-animations-throughput.html#60')45class MainSixtyImplSixtyWithJankAndDelay(ThroughputMetricStory):46  BASE_NAME = 'main_60fps_with_jank_and_delay_impl_60fps'47  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS48  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'49         'main-impl-animations-throughput.html?jank&delay#60')50class MainSixtyImplSixtyNoUpdate(ThroughputMetricStory):51  BASE_NAME = 'main_60fps_impl_60fps_no_update'52  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS53  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'54         'main-impl-animations-no-update-throughput.html#60')55class MainSixtyImplSixtyNoUpdateJank(ThroughputMetricStory):56  BASE_NAME = 'main_60fps_impl_60fps_no_update_jank'57  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS58  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'59         'main-impl-animations-no-update-throughput.html?jank#60')60class MainFifteenImplZero(ThroughputMetricStory):61  BASE_NAME = 'main_15fps_impl_0fps'62  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS63  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'64         'main-animations-throughput.html#15')65class MainThirtyImplZero(ThroughputMetricStory):66  BASE_NAME = 'main_30fps_impl_0fps'67  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS68  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'69         'main-animations-throughput.html#30')70class MainSixtyImplZero(ThroughputMetricStory):71  BASE_NAME = 'main_60fps_impl_0fps'72  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS73  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'74         'main-animations-throughput.html#60')75class MainFifteenWithJankImplZero(ThroughputMetricStory):76  BASE_NAME = 'main_15fps_with_jank_impl_0fps'77  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS78  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'79         'main-animations-throughput.html?jank#15')80class MainSixtyWithJankImplZero(ThroughputMetricStory):81  BASE_NAME = 'main_60fps_with_jank_impl_0fps'82  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS83  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'84         'main-animations-throughput.html?jank#60')85class MainSixtyWithExtremeJankImplZero(ThroughputMetricStory):86  BASE_NAME = 'main_60fps_with_extreme_jank_impl_0fps'87  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS88  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'89         'main-animations-throughput.html?extremejank#60')90class MainZeroWithJankImplZero(ThroughputMetricStory):91  BASE_NAME = 'main_0fps_with_jank_impl_0fps'92  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS93  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'94         'main-animations-throughput.html?jank#0')95class OffScreenMainSixty(ThroughputMetricStory):96  BASE_NAME = 'off_screen_main_60fps'97  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS98  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'99         'main-animations-throughput.html?offscreen#60')100class OffScreenMainSixtyJank(ThroughputMetricStory):101  BASE_NAME = 'off_screen_main_60fps_jank'102  SUPPORTED_PLATFORMS = platforms.ALL_PLATFORMS103  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'104         'main-animations-throughput.html?jank&offscreen#60')105class ThroughputScrolling(ThroughputMetricStory):106  ABSTRACT_STORY = True107  URL = ('file://../../../../chrome/test/data/perf/throughput_test_cases/'108         'throughput_scroll.html')109  SPEED_IN_PIXELS_PER_SECOND = 5000110  SELECTOR = 'undefined'111  def RunPageInteractions(self, action_runner):112    selector = self.SELECTOR113    action_runner.WaitForElement(selector=selector)114    with action_runner.CreateGestureInteraction('ScrollAction'):115      action_runner.ScrollElement(selector=selector, direction='down')116      action_runner.ScrollElement(selector=selector, direction='up')117class ThroughputScrollingUncomposited(ThroughputScrolling):118  BASE_NAME = 'throughput_scrolling_uncomposited'119  SELECTOR = '.uncomposited'120class ThroughputScrollingComposited(ThroughputScrolling):121  BASE_NAME = 'throughput_scrolling_composited'122  SELECTOR = '#composited'123class ThroughputScrollingPassiveHandler(ThroughputScrolling):124  BASE_NAME = 'throughput_scrolling_passive_handler'125  SELECTOR = '#handler_passive'126class ThroughputScrollingActiveHandler(ThroughputScrolling):127  BASE_NAME = 'throughput_scrolling_active_handler'...get_platforms.py
Source:get_platforms.py  
...10        default='all',11        help='Comma-separated list of platforms. Specify "all" to use all platforms (the default).'12    )13    args = parser.parse_args()14    platforms = _get_platforms(which=args.platforms)15    print(json.dumps(platforms))16def _get_platforms(which='all'):17    supported_platforms = subprocess.check_output(['make', 'print-platforms'], text=True)18    supported_platforms = supported_platforms.split()19    if which == 'all':20        return supported_platforms21    platforms = which.split(',')22    platforms = [p for p in platforms if p in supported_platforms]23    return platforms24if __name__ == '__main__':...Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!
