| OLD | NEW |
| 1 # Copyright 2017 The Chromium Authors. All rights reserved. | 1 # Copyright 2017 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 import py_utils | 5 import py_utils |
| 6 import logging | 6 import logging |
| 7 | 7 |
| 8 from page_sets.system_health import system_health_story | 8 from page_sets.system_health import system_health_story |
| 9 from page_sets.system_health import story_tags | 9 from page_sets.system_health import story_tags |
| 10 from page_sets.system_health import platforms | 10 from page_sets.system_health import platforms |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 new_tab = tabs.New() | 29 new_tab = tabs.New() |
| 30 new_tab.action_runner.Navigate(url) | 30 new_tab.action_runner.Navigate(url) |
| 31 | 31 |
| 32 for i, url in enumerate(url_list): | 32 for i, url in enumerate(url_list): |
| 33 try: | 33 try: |
| 34 tabs[i].action_runner.WaitForNetworkQuiescence() | 34 tabs[i].action_runner.WaitForNetworkQuiescence() |
| 35 except py_utils.TimeoutException: | 35 except py_utils.TimeoutException: |
| 36 logging.warning('WaitForNetworkQuiescence() timeout, url[%d]: %s' | 36 logging.warning('WaitForNetworkQuiescence() timeout, url[%d]: %s' |
| 37 % (i, url)) | 37 % (i, url)) |
| 38 | 38 |
| 39 def RunPageInteractions(self, action_runner): | 39 def _DidLoadDocument(self, action_runner): |
| 40 for tab in action_runner.tab.browser.tabs: | 40 for tab in action_runner.tab.browser.tabs: |
| 41 tab.Activate() | 41 tab.Activate() |
| 42 tab.WaitForFrameToBeDisplayed() | 42 tab.WaitForFrameToBeDisplayed() |
| 43 | 43 |
| 44 | 44 |
| 45 class MultiTabTypical24Story(MultiTabStory): | 45 class MultiTabTypical24Story(MultiTabStory): |
| 46 """Load 24 different web sites in 24 tabs, then cycle through each tab.""" | 46 """Load 24 different web sites in 24 tabs, then cycle through each tab.""" |
| 47 NAME = 'multitab:misc:typical24' | 47 NAME = 'multitab:misc:typical24' |
| 48 TAGS = [story_tags.TABS_SWITCHING] | 48 TAGS = [story_tags.TABS_SWITCHING] |
| 49 URL_LIST = [ | 49 URL_LIST = [ |
| (...skipping 28 matching lines...) Expand all Loading... |
| 78 '1837448?brand=none&tm_link=tm_homeA_rc_name2'), | 78 '1837448?brand=none&tm_link=tm_homeA_rc_name2'), |
| 79 # pylint: disable=line-too-long | 79 # pylint: disable=line-too-long |
| 80 'http://www.theverge.com/2013/3/5/4061684/inside-ted-the-smartest-bubble-in-
the-world', | 80 'http://www.theverge.com/2013/3/5/4061684/inside-ted-the-smartest-bubble-in-
the-world', |
| 81 'http://www.airbnb.com/', | 81 'http://www.airbnb.com/', |
| 82 'http://www.ign.com/', | 82 'http://www.ign.com/', |
| 83 # Why: Alexa health #25 | 83 # Why: Alexa health #25 |
| 84 'http://www.fda.gov', | 84 'http://www.fda.gov', |
| 85 ] | 85 ] |
| 86 URL = URL_LIST[0] | 86 URL = URL_LIST[0] |
| 87 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY | 87 SUPPORTED_PLATFORMS = platforms.DESKTOP_ONLY |
| OLD | NEW |