| 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 json |  | 
| 5 import os |  | 
| 6 |  | 
| 7 from telemetry.page import page as page_module |  | 
| 8 from telemetry.page import shared_page_state |  | 
| 9 from telemetry import story |  | 
| 10 |  | 
| 11 |  | 
| 12 __location__ = os.path.realpath( |  | 
| 13       os.path.join(os.getcwd(), os.path.dirname(__file__))) |  | 
| 14 |  | 
| 15 # Generated on 2013-09-03 13:59:53.459117 by rmistry using |  | 
| 16 # create_page_set.py. |  | 
| 17 _TOP_10000_ALEXA_FILE = os.path.join(__location__, 'alexa1-10000-urls.json') |  | 
| 18 |  | 
| 19 |  | 
| 20 class Alexa1To10000Page(page_module.Page): |  | 
| 21 |  | 
| 22   def __init__(self, url, page_set): |  | 
| 23     super(Alexa1To10000Page, self).__init__( |  | 
| 24         url=url, page_set=page_set, |  | 
| 25         shared_page_state_class=shared_page_state.SharedDesktopPageState) |  | 
| 26 |  | 
| 27   def RunPageInteractions(self, action_runner): |  | 
| 28     with action_runner.CreateGestureInteraction('ScrollAction'): |  | 
| 29       action_runner.ScrollPage() |  | 
| 30 |  | 
| 31 |  | 
| 32 class Alexa1To10000PageSet(story.StorySet): |  | 
| 33   """ Top 1-10000 Alexa global. |  | 
| 34       Generated on 2013-09-03 13:59:53.459117 by rmistry using |  | 
| 35       create_page_set.py. |  | 
| 36   """ |  | 
| 37 |  | 
| 38   def __init__(self): |  | 
| 39     super(Alexa1To10000PageSet, self).__init__() |  | 
| 40 |  | 
| 41     with open(_TOP_10000_ALEXA_FILE) as f: |  | 
| 42       urls_list = json.load(f) |  | 
| 43     for url in urls_list: |  | 
| 44       self.AddStory(Alexa1To10000Page(url, self)) |  | 
| OLD | NEW | 
|---|