| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 page_sets.system_health import platforms | 5 from page_sets.system_health import platforms |
| 6 from page_sets.system_health import story_tags | 6 from page_sets.system_health import story_tags |
| 7 from page_sets.system_health import system_health_story | 7 from page_sets.system_health import system_health_story |
| 8 | 8 |
| 9 from telemetry import decorators | 9 from telemetry import decorators |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 action_runner.WaitForElement(selector=self._RESULT_SELECTOR) | 36 action_runner.WaitForElement(selector=self._RESULT_SELECTOR) |
| 37 action_runner.Wait(1) | 37 action_runner.Wait(1) |
| 38 action_runner.ScrollPageToElement(selector=self._RESULT_SELECTOR) | 38 action_runner.ScrollPageToElement(selector=self._RESULT_SELECTOR) |
| 39 | 39 |
| 40 # Click on the Wikipedia result. | 40 # Click on the Wikipedia result. |
| 41 action_runner.Wait(1) | 41 action_runner.Wait(1) |
| 42 action_runner.TapElement(selector=self._RESULT_SELECTOR) | 42 action_runner.TapElement(selector=self._RESULT_SELECTOR) |
| 43 action_runner.tab.WaitForDocumentReadyStateToBeComplete() | 43 action_runner.tab.WaitForDocumentReadyStateToBeComplete() |
| 44 | 44 |
| 45 | 45 |
| 46 @decorators.Disabled('android-webview') # Webview does not have omnibox |
| 46 class SearchOmniboxStory(system_health_story.SystemHealthStory): | 47 class SearchOmniboxStory(system_health_story.SystemHealthStory): |
| 47 """Story that peforms search by using omnibox search provider | 48 """Story that peforms search by using omnibox search provider |
| 48 | 49 |
| 49 Loads a website and enters a search query on omnibox and navigates to default | 50 Loads a website and enters a search query on omnibox and navigates to default |
| 50 search provider (google). | 51 search provider (google). |
| 51 """ | 52 """ |
| 52 NAME = 'browse:chrome:omnibox' | 53 NAME = 'browse:chrome:omnibox' |
| 53 URL = 'https://www.google.co.in' | 54 URL = 'https://www.google.co.in' |
| 54 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | 55 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| 55 TAGS = [story_tags.EMERGING_MARKET] | 56 TAGS = [story_tags.EMERGING_MARKET] |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 platform.android_action_runner.InputText(keyword) | 99 platform.android_action_runner.InputText(keyword) |
| 99 platform.android_action_runner.InputKeyEvent(keyevent.KEYCODE_ENTER) | 100 platform.android_action_runner.InputKeyEvent(keyevent.KEYCODE_ENTER) |
| 100 action_runner.WaitForNavigate() | 101 action_runner.WaitForNavigate() |
| 101 action_runner.Wait(1.5) # Read results | 102 action_runner.Wait(1.5) # Read results |
| 102 action_runner.ScrollPage(use_touch=True) | 103 action_runner.ScrollPage(use_touch=True) |
| 103 action_runner.NavigateBack() | 104 action_runner.NavigateBack() |
| 104 action_runner.WaitForNavigate() | 105 action_runner.WaitForNavigate() |
| 105 | 106 |
| 106 app_ui.WaitForUiNode(resource_id='menu_button').Tap() | 107 app_ui.WaitForUiNode(resource_id='menu_button').Tap() |
| 107 app_ui.WaitForUiNode(resource_id='menu_item_text') | 108 app_ui.WaitForUiNode(resource_id='menu_item_text') |
| OLD | NEW |