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.
7 from telemetry
.page
import page
as page_module
8 from telemetry
.page
import shared_page_state
9 from telemetry
import story
12 __location__
= os
.path
.realpath(
13 os
.path
.join(os
.getcwd(), os
.path
.dirname(__file__
)))
15 # Generated on 2013-09-03 13:59:53.459117 by rmistry using
17 _TOP_10000_ALEXA_FILE
= os
.path
.join(__location__
, 'alexa1-10000-urls.json')
20 class Alexa1To10000Page(page_module
.Page
):
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
)
27 def RunPageInteractions(self
, action_runner
):
28 with action_runner
.CreateGestureInteraction('ScrollAction'):
29 action_runner
.ScrollPage()
32 class Alexa1To10000PageSet(story
.StorySet
):
33 """ Top 1-10000 Alexa global.
34 Generated on 2013-09-03 13:59:53.459117 by rmistry using
39 super(Alexa1To10000PageSet
, self
).__init
__()
41 with
open(_TOP_10000_ALEXA_FILE
) as f
:
42 urls_list
= json
.load(f
)
44 self
.AddStory(Alexa1To10000Page(url
, self
))