| 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 from telemetry.page import page as page_module | 4 from telemetry.page import page as page_module |
| 5 from telemetry.page import page_set as page_set_module | 5 from telemetry.page import page_set as page_set_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=''): | 10 def __init__(self, url, page_set, name=''): |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 203 |
| 204 class Page13(KeyMobileSitesPage): | 204 class Page13(KeyMobileSitesPage): |
| 205 | 205 |
| 206 """ Why: #8 (Alexa global), picked an interesting page """ | 206 """ Why: #8 (Alexa global), picked an interesting page """ |
| 207 | 207 |
| 208 def __init__(self, page_set): | 208 def __init__(self, page_set): |
| 209 super(Page13, self).__init__( | 209 super(Page13, self).__init__( |
| 210 url='http://twitter.com/katyperry', | 210 url='http://twitter.com/katyperry', |
| 211 page_set=page_set, | 211 page_set=page_set, |
| 212 name='Twitter') | 212 name='Twitter') |
| 213 self.disabled = 'Forbidden (Rate Limit Exceeded)' | |
| 214 | 213 |
| 215 | 214 |
| 216 class Page14(KeyMobileSitesPage): | 215 class Page14(KeyMobileSitesPage): |
| 217 | 216 |
| 218 """ Why: #37 (Alexa global) """ | 217 """ Why: #37 (Alexa global) """ |
| 219 | 218 |
| 220 def __init__(self, page_set): | 219 def __init__(self, page_set): |
| 221 super(Page14, self).__init__( | 220 super(Page14, self).__init__( |
| 222 url='http://pinterest.com', | 221 url='http://pinterest.com', |
| 223 page_set=page_set, | 222 page_set=page_set, |
| 224 name='Pinterest') | 223 name='Pinterest') |
| 225 | 224 |
| 226 | 225 |
| 227 class Page15(KeyMobileSitesPage): | 226 class Page15(KeyMobileSitesPage): |
| 228 | 227 |
| 229 """ Why: #1 sports """ | 228 """ Why: #1 sports """ |
| 230 | 229 |
| 231 def __init__(self, page_set): | 230 def __init__(self, page_set): |
| 232 super(Page15, self).__init__( | 231 super(Page15, self).__init__( |
| 233 url='http://espn.go.com', | 232 url='http://espn.go.com', |
| 234 page_set=page_set, | 233 page_set=page_set, |
| 235 name='ESPN') | 234 name='ESPN') |
| 236 self.disabled = 'Fails often; crbug.com/249722' | |
| 237 | 235 |
| 238 | 236 |
| 239 class Page16(KeyMobileSitesPage): | 237 class Page16(KeyMobileSitesPage): |
| 240 | 238 |
| 241 """ Why: #1 Alexa reference """ | 239 """ Why: #1 Alexa reference """ |
| 242 | 240 |
| 243 def __init__(self, page_set): | 241 def __init__(self, page_set): |
| 244 super(Page16, self).__init__( | 242 super(Page16, self).__init__( |
| 245 # pylint: disable=C0301 | 243 # pylint: disable=C0301 |
| 246 url='http://answers.yahoo.com/question/index?qid=20110117024343AAopj8f', | 244 url='http://answers.yahoo.com/question/index?qid=20110117024343AAopj8f', |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 | 319 |
| 322 class Page21(KeyMobileSitesPage): | 320 class Page21(KeyMobileSitesPage): |
| 323 | 321 |
| 324 """ Why: crbug.com/172906 """ | 322 """ Why: crbug.com/172906 """ |
| 325 | 323 |
| 326 def __init__(self, page_set): | 324 def __init__(self, page_set): |
| 327 super(Page21, self).__init__( | 325 super(Page21, self).__init__( |
| 328 url='http://groupcloned.com', | 326 url='http://groupcloned.com', |
| 329 page_set=page_set) | 327 page_set=page_set) |
| 330 | 328 |
| 331 self.disabled = ('Page behaves non-deterministically, replaced with test' | |
| 332 'version for now') | |
| 333 | 329 |
| 334 def RunNavigateSteps(self, action_runner): | 330 def RunNavigateSteps(self, action_runner): |
| 335 action_runner.NavigateToPage(self) | 331 action_runner.NavigateToPage(self) |
| 336 action_runner.Wait(5) | 332 action_runner.Wait(5) |
| 337 action_runner.WaitForJavaScriptCondition(''' | 333 action_runner.WaitForJavaScriptCondition(''' |
| 338 document.getElementById("element-19") !== null && | 334 document.getElementById("element-19") !== null && |
| 339 document.getElementById("element-19").contentDocument | 335 document.getElementById("element-19").contentDocument |
| 340 .getElementById("element-22") !== null && | 336 .getElementById("element-22") !== null && |
| 341 document.getElementById("element-19").contentDocument | 337 document.getElementById("element-19").contentDocument |
| 342 .getElementsByClassName( | 338 .getElementsByClassName( |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 | 379 |
| 384 class Page23(KeyMobileSitesPage): | 380 class Page23(KeyMobileSitesPage): |
| 385 | 381 |
| 386 """ Why: crbug.com/231413 """ | 382 """ Why: crbug.com/231413 """ |
| 387 | 383 |
| 388 def __init__(self, page_set): | 384 def __init__(self, page_set): |
| 389 super(Page23, self).__init__( | 385 super(Page23, self).__init__( |
| 390 url='http://forecast.io', | 386 url='http://forecast.io', |
| 391 page_set=page_set) | 387 page_set=page_set) |
| 392 | 388 |
| 393 self.disabled = u"Doesn't scroll; crbug.com/249736" | |
| 394 | |
| 395 | 389 |
| 396 class Page24(KeyMobileSitesPage): | 390 class Page24(KeyMobileSitesPage): |
| 397 | 391 |
| 398 """ Why: Google News: accelerated scrolling version """ | 392 """ Why: Google News: accelerated scrolling version """ |
| 399 | 393 |
| 400 def __init__(self, page_set): | 394 def __init__(self, page_set): |
| 401 super(Page24, self).__init__( | 395 super(Page24, self).__init__( |
| 402 url='http://mobile-news.sandbox.google.com/news/pt1', | 396 url='http://mobile-news.sandbox.google.com/news/pt1', |
| 403 page_set=page_set) | 397 page_set=page_set) |
| 404 | 398 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 self.AddPage(Page3(self)) | 468 self.AddPage(Page3(self)) |
| 475 self.AddPage(Page4(self)) | 469 self.AddPage(Page4(self)) |
| 476 self.AddPage(Page5(self)) | 470 self.AddPage(Page5(self)) |
| 477 self.AddPage(Page6(self)) | 471 self.AddPage(Page6(self)) |
| 478 self.AddPage(Page7(self)) | 472 self.AddPage(Page7(self)) |
| 479 self.AddPage(Page8(self)) | 473 self.AddPage(Page8(self)) |
| 480 self.AddPage(Page9(self)) | 474 self.AddPage(Page9(self)) |
| 481 self.AddPage(Page10(self)) | 475 self.AddPage(Page10(self)) |
| 482 self.AddPage(Page11(self)) | 476 self.AddPage(Page11(self)) |
| 483 self.AddPage(Page12(self)) | 477 self.AddPage(Page12(self)) |
| 484 # self.AddPage(Page13(self)) | 478 # Forbidden (Rate Limit Exceeded) |
| 479 # self.AddPage(Page13(self)) |
| 485 self.AddPage(Page14(self)) | 480 self.AddPage(Page14(self)) |
| 486 # self.AddPage(Page15(self)) | 481 # Fails often; crbug.com/249722' |
| 482 # self.AddPage(Page15(self)) |
| 487 self.AddPage(Page16(self)) | 483 self.AddPage(Page16(self)) |
| 488 self.AddPage(Page17(self)) | 484 self.AddPage(Page17(self)) |
| 489 self.AddPage(Page18(self)) | 485 self.AddPage(Page18(self)) |
| 490 self.AddPage(Page19(self)) | 486 self.AddPage(Page19(self)) |
| 491 self.AddPage(Page20(self)) | 487 self.AddPage(Page20(self)) |
| 492 self.AddPage(Page21(self)) | 488 # Page behaves non-deterministically, replaced with test version for now. |
| 493 # mean_input_event_latency cannot be tracked correctly for Page22. | 489 # self.AddPage(Page21(self)) |
| 494 # See crbug.com/409086. | 490 # mean_input_event_latency cannot be tracked correctly for Page22. |
| 495 # self.AddPage(Page22(self)) | 491 # See crbug.com/409086. |
| 496 # self.AddPage(Page23(self)) | 492 # self.AddPage(Page22(self)) |
| 493 # self.AddPage(Page23(self)) |
| 494 # Doesn't scroll; crbug.com/249736 |
| 495 # self.AddPage(Page23(self)) |
| 497 self.AddPage(Page24(self)) | 496 self.AddPage(Page24(self)) |
| 498 self.AddPage(Page25(self)) | 497 self.AddPage(Page25(self)) |
| 499 self.AddPage(Page26(self)) | 498 self.AddPage(Page26(self)) |
| 500 | 499 |
| 501 urls_list = [ | 500 urls_list = [ |
| 502 # Why: crbug.com/242544 | 501 # Why: crbug.com/242544 |
| 503 ('http://www.androidpolice.com/2012/10/03/rumor-evidence-mounts-that-an-' | 502 ('http://www.androidpolice.com/2012/10/03/rumor-evidence-mounts-that-an-' |
| 504 'lg-optimus-g-nexus-is-coming-along-with-a-nexus-phone-certification-' | 503 'lg-optimus-g-nexus-is-coming-along-with-a-nexus-phone-certification-' |
| 505 'program/'), | 504 'program/'), |
| 506 # Why: crbug.com/149958 | 505 # Why: crbug.com/149958 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 ('http://www.baidu.com/s?wd=barack+obama&rsv_bp=0&rsv_spt=3&rsv_sug3=9&' | 539 ('http://www.baidu.com/s?wd=barack+obama&rsv_bp=0&rsv_spt=3&rsv_sug3=9&' |
| 541 'rsv_sug=0&rsv_sug4=3824&rsv_sug1=3&inputT=4920'), | 540 'rsv_sug=0&rsv_sug4=3824&rsv_sug1=3&inputT=4920'), |
| 542 # Why: Top search engine | 541 # Why: Top search engine |
| 543 'http://www.bing.com/search?q=sloths', | 542 'http://www.bing.com/search?q=sloths', |
| 544 # Why: Good example of poor initial scrolling | 543 # Why: Good example of poor initial scrolling |
| 545 'http://ftw.usatoday.com/2014/05/spelling-bee-rules-shenanigans' | 544 'http://ftw.usatoday.com/2014/05/spelling-bee-rules-shenanigans' |
| 546 ] | 545 ] |
| 547 | 546 |
| 548 for url in urls_list: | 547 for url in urls_list: |
| 549 self.AddPage(KeyMobileSitesPage(url, self)) | 548 self.AddPage(KeyMobileSitesPage(url, self)) |
| OLD | NEW |