OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 from telemetry.page import page as page_module | 5 from telemetry.page import page as page_module |
6 | 6 |
7 | 7 |
8 class KeyMobileSitesPage(page_module.Page): | 8 class KeyMobileSitesPage(page_module.Page): |
9 | 9 |
10 def __init__(self, url, page_set, name='', labels=None): | 10 def __init__(self, url, page_set, name='', labels=None): |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 def RunNavigateSteps(self, action_runner): | 97 def RunNavigateSteps(self, action_runner): |
98 super(YoutubeMobilePage, self).RunNavigateSteps(action_runner) | 98 super(YoutubeMobilePage, self).RunNavigateSteps(action_runner) |
99 action_runner.WaitForJavaScriptCondition( | 99 action_runner.WaitForJavaScriptCondition( |
100 'document.getElementById("paginatortarget") !== null') | 100 'document.getElementById("paginatortarget") !== null') |
101 | 101 |
102 | 102 |
103 class LinkedInPage(KeyMobileSitesPage): | 103 class LinkedInPage(KeyMobileSitesPage): |
104 | 104 |
105 """ Why: #12 (Alexa global),Public profile """ | 105 """ Why: #12 (Alexa global),Public profile """ |
106 | 106 |
107 def __init__(self, page_set): | 107 def __init__(self, page_set, name='LinkedIn'): |
108 super(LinkedInPage, self).__init__( | 108 super(LinkedInPage, self).__init__( |
109 url='https://www.linkedin.com/in/linustorvalds', | 109 url='https://www.linkedin.com/in/linustorvalds', |
110 page_set=page_set, | 110 page_set=page_set, |
111 name='LinkedIn') | 111 name=name) |
112 | 112 |
113 def RunNavigateSteps(self, action_runner): | 113 def RunNavigateSteps(self, action_runner): |
114 super(LinkedInPage, self).RunNavigateSteps(action_runner) | 114 super(LinkedInPage, self).RunNavigateSteps(action_runner) |
115 action_runner.WaitForJavaScriptCondition( | 115 action_runner.WaitForJavaScriptCondition( |
116 'document.getElementById("profile-view-scroller") !== null') | 116 'document.getElementById("profile-view-scroller") !== null') |
117 | 117 |
118 | 118 |
119 | 119 |
120 class YahooAnswersPage(KeyMobileSitesPage): | 120 class YahooAnswersPage(KeyMobileSitesPage): |
121 | 121 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 class AmazonNicolasCagePage(KeyMobileSitesPage): | 226 class AmazonNicolasCagePage(KeyMobileSitesPage): |
227 | 227 |
228 """ | 228 """ |
229 Why: #1 world commerce website by visits; #3 commerce in the US by time spent | 229 Why: #1 world commerce website by visits; #3 commerce in the US by time spent |
230 """ | 230 """ |
231 | 231 |
232 def __init__(self, page_set): | 232 def __init__(self, page_set): |
233 super(AmazonNicolasCagePage, self).__init__( | 233 super(AmazonNicolasCagePage, self).__init__( |
234 url='http://www.amazon.com/gp/aw/s/ref=is_box_?k=nicolas+cage', | 234 url='http://www.amazon.com/gp/aw/s/ref=is_box_?k=nicolas+cage', |
235 page_set=page_set) | 235 page_set=page_set) |
OLD | NEW |