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
3# found in the LICENSE file.
4from telemetry.page import shared_page_state
5
6from page_sets.rendering import rendering_story
7from page_sets.rendering import story_tags
8
9
10class ToughTextureUploadPage(rendering_story.RenderingStory):
11  ABSTRACT_STORY = True
12  TAGS = [story_tags.TOUGH_TEXTURE_UPLOAD]
13
14  def __init__(self,
15               page_set,
16               shared_page_state_class=shared_page_state.SharedPageState,
17               name_suffix="",
18               extra_browser_args=None):
19    super(ToughTextureUploadPage, self).__init__(
20        page_set=page_set,
21        shared_page_state_class=shared_page_state_class,
22        name_suffix=name_suffix,
23        extra_browser_args=extra_browser_args)
24
25  def RunPageInteractions(self, action_runner):
26    with action_runner.CreateInteraction('Animation'):
27      action_runner.Wait(10)
28
29
30class BackgroundColorAnimationPage(ToughTextureUploadPage):
31  BASE_NAME = 'background_color_animation'
32  URL = 'file://../tough_texture_upload_cases/background_color_animation.html'
33
34
35class BackgroundColorAnimationWithGradientPage(ToughTextureUploadPage):
36  BASE_NAME = 'background_color_animation_with_gradient'
37  # pylint: disable=line-too-long
38  URL = 'file://../tough_texture_upload_cases/background_color_animation_with_gradient.html'
39
40
41class SmallTextureUploadsPage(ToughTextureUploadPage):
42  BASE_NAME = 'small_texture_uploads'
43  URL = 'file://../tough_texture_upload_cases/small_texture_uploads.html'
44
45
46class MediumTextureUploadsPage(ToughTextureUploadPage):
47  BASE_NAME = 'medium_texture_uploads'
48  URL = 'file://../tough_texture_upload_cases/medium_texture_uploads.html'
49
50
51class LargeTextureUploadsPage(ToughTextureUploadPage):
52  BASE_NAME = 'large_texture_uploads'
53  URL = 'file://../tough_texture_upload_cases/large_texture_uploads.html'
54
55
56class ExtraLargeTextureUploadsPage(ToughTextureUploadPage):
57  BASE_NAME = 'extra_large_texture_uploads'
58  URL = 'file://../tough_texture_upload_cases/extra_large_texture_uploads.html'
59  TAGS = ToughTextureUploadPage.TAGS + [
60    story_tags.REPRESENTATIVE_MOBILE
61  ]
62