aboutsummaryrefslogtreecommitdiff
path: root/catapult/telemetry/telemetry/internal/testing/archive_files/test_page_set.py
blob: ec53709d5bfa0df05b7acf87babde6d41999f8c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# 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 import story
from telemetry.page import page
from telemetry.internal.testing.pages.external_page import ExternalPage


class InternalPage(page.Page):
  def __init__(self, story_set):
    super(InternalPage, self).__init__('file://bar.html', story=story_set)

class TestPageSet(story.StorySet):
  """A pageset for testing purpose"""

  def __init__(self):
    super(TestPageSet, self).__init__(
      archive_data_file='data/archive_files/test.json',
      credentials_path='data/credential',
      user_agent_type='desktop',
      bucket=story.PUBLIC_BUCKET)

    #top google property; a google tab is often open
    class Google(page.Page):
      def __init__(self, story_set):
        # pylint: disable=bad-super-call
        super(Google, self).__init__('https://www.google.com',
                                     page_set=story_set)

      def RunGetActionRunner(self, action_runner):
        return action_runner

    self.AddStory(Google(self))
    self.AddStory(InternalPage(self))
    self.AddStory(ExternalPage(self))