| OLD | NEW |
| 1 # encoding: utf-8 | 1 # encoding: utf-8 |
| 2 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 from page_sets.system_health import platforms | 6 from page_sets.system_health import platforms |
| 7 from page_sets.system_health import system_health_story | 7 from page_sets.system_health import system_health_story |
| 8 | 8 |
| 9 from page_sets.login_helpers import pinterest_login | 9 from page_sets.login_helpers import pinterest_login |
| 10 | 10 |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 | 386 |
| 387 class YouTubeMobileStory(_MediaBrowsingStory): | 387 class YouTubeMobileStory(_MediaBrowsingStory): |
| 388 NAME = 'browse:media:youtube' | 388 NAME = 'browse:media:youtube' |
| 389 URL = 'https://m.youtube.com/watch?v=QGfhS1hfTWw&autoplay=false' | 389 URL = 'https://m.youtube.com/watch?v=QGfhS1hfTWw&autoplay=false' |
| 390 ITEM_SELECTOR = '._mhgb > a' | 390 ITEM_SELECTOR = '._mhgb > a' |
| 391 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 391 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 392 IS_SINGLE_PAGE_APP = True | 392 IS_SINGLE_PAGE_APP = True |
| 393 ITEM_SELECTOR_INDEX = 3 | 393 ITEM_SELECTOR_INDEX = 3 |
| 394 | 394 |
| 395 | 395 |
| 396 # Failing during CQ runs. crbug.com/661775 | |
| 397 @decorators.Disabled('linux', 'win') | |
| 398 class YouTubeDesktopStory(_MediaBrowsingStory): | 396 class YouTubeDesktopStory(_MediaBrowsingStory): |
| 399 NAME = 'browse:media:youtube' | 397 NAME = 'browse:media:youtube' |
| 400 URL = 'https://www.youtube.com/watch?v=QGfhS1hfTWw&autoplay=false' | 398 URL = 'https://www.youtube.com/watch?v=QGfhS1hfTWw&autoplay=false' |
| 401 ITEM_SELECTOR = '.yt-uix-simple-thumb-related' | 399 ITEM_SELECTOR = '.yt-uix-simple-thumb-related' |
| 402 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY | 400 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
| 403 IS_SINGLE_PAGE_APP = True | 401 IS_SINGLE_PAGE_APP = True |
| 404 # A longer view time allows videos to load and play. | 402 # A longer view time allows videos to load and play. |
| 405 ITEM_VIEW_TIME_IN_SECONDS = 5 | 403 ITEM_VIEW_TIME_IN_SECONDS = 5 |
| 406 ITEMS_TO_VISIT = 8 | 404 ITEMS_TO_VISIT = 8 |
| 407 ITEM_SELECTOR_INDEX = 3 | 405 ITEM_SELECTOR_INDEX = 3 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 inner_save_function = 'document.querySelector(".nameAndIcons")' | 469 inner_save_function = 'document.querySelector(".nameAndIcons")' |
| 472 action_runner.WaitForElement(element_function=inner_save_function) | 470 action_runner.WaitForElement(element_function=inner_save_function) |
| 473 action_runner.ClickElement(element_function=inner_save_function) | 471 action_runner.ClickElement(element_function=inner_save_function) |
| 474 action_runner.Wait(1) # Wait to make navigation realistic. | 472 action_runner.Wait(1) # Wait to make navigation realistic. |
| 475 | 473 |
| 476 # Close selection. | 474 # Close selection. |
| 477 x_element_function = ('document.querySelector(' | 475 x_element_function = ('document.querySelector(' |
| 478 '".Button.borderless.close.visible")') | 476 '".Button.borderless.close.visible")') |
| 479 action_runner.ClickElement(element_function=x_element_function) | 477 action_runner.ClickElement(element_function=x_element_function) |
| 480 action_runner.Wait(1) # Wait to make navigation realistic. | 478 action_runner.Wait(1) # Wait to make navigation realistic. |
| OLD | NEW |