| OLD | NEW |
| (Empty) | |
| 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 import cgi |
| 5 import json |
| 6 import os |
| 7 import sys |
| 8 |
| 9 from telemetry.page import page as page_module |
| 10 from telemetry.page import shared_page_state |
| 11 from telemetry import story |
| 12 |
| 13 DUMP_WAIT_TIME = 10 |
| 14 DUMP_COUNT = 10 |
| 15 |
| 16 __location__ = os.path.realpath( |
| 17 os.path.join(os.getcwd(), os.path.dirname(__file__))) |
| 18 |
| 19 |
| 20 _TEST_PAGES_FILE = os.path.join(__location__, 'test.json') |
| 21 |
| 22 |
| 23 class TestPage(page_module.Page): |
| 24 def __init__(self, url, urls_list, page_set): |
| 25 super(TestPage, self).__init__( |
| 26 url=url, page_set=page_set, |
| 27 # shared_page_state_class=shared_page_state.SharedMobilePageState, |
| 28 shared_page_state_class=shared_page_state.SharedPageState, |
| 29 credentials_path='data/credentials.json') |
| 30 |
| 31 def RunPageInteractions(self, action_runner): |
| 32 action_runner.Wait(30) |
| 33 |
| 34 |
| 35 class TestPageSet(story.StorySet): |
| 36 def __init__(self): |
| 37 super(TestPageSet, self).__init__() |
| 38 |
| 39 for i in range(40): |
| 40 self.AddStory( |
| 41 TestPage('https://www.google.com/#q=obama', [], self)) |
| OLD | NEW |