Home | History | Annotate | Download | only in archive_files
      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.
      4 
      5 from telemetry import story
      6 from telemetry.page import page
      7 from telemetry.internal.testing.pages.external_page import ExternalPage
      8 
      9 
     10 class InternalPage(page.Page):
     11   def __init__(self, story_set):
     12     super(InternalPage, self).__init__('file://bar.html', story=story_set)
     13 
     14 class TestPageSet(story.StorySet):
     15   """A pageset for testing purpose"""
     16 
     17   def __init__(self):
     18     super(TestPageSet, self).__init__(
     19       archive_data_file='data/archive_files/test.json',
     20       credentials_path='data/credential',
     21       user_agent_type='desktop',
     22       bucket=story.PUBLIC_BUCKET)
     23 
     24     #top google property; a google tab is often open
     25     class Google(page.Page):
     26       def __init__(self, story_set):
     27         # pylint: disable=bad-super-call
     28         super(Google, self).__init__('https://www.google.com',
     29                                      page_set=story_set)
     30 
     31       def RunGetActionRunner(self, action_runner):
     32         return action_runner
     33 
     34     self.AddStory(Google(self))
     35     self.AddStory(InternalPage(self))
     36     self.AddStory(ExternalPage(self))
     37