Chromium Code Reviews| Index: tools/perf/page_sets/system_health/searching_stories.py |
| diff --git a/tools/perf/page_sets/system_health/searching_stories.py b/tools/perf/page_sets/system_health/searching_stories.py |
| index 329a0cb5ab276b5a16f3b94ee2e5bd9da0109144..5a5dee80893e6828753dab81a669232702763779 100644 |
| --- a/tools/perf/page_sets/system_health/searching_stories.py |
| +++ b/tools/perf/page_sets/system_health/searching_stories.py |
| @@ -2,12 +2,15 @@ |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| +from page_sets.system_health import platforms |
| +from page_sets.system_health import story_tags |
| from page_sets.system_health import system_health_story |
| class SearchGoogleStory(system_health_story.SystemHealthStory): |
| NAME = 'search:portal:google' |
| URL = 'https://www.google.co.uk/' |
| + TAGS = [story_tags.EMERGING_MARKET] |
| _SEARCH_BOX_SELECTOR = 'input[aria-label="Search"]' |
| _RESULT_SELECTOR = '.r > a[href*="wikipedia"]' |
| @@ -33,3 +36,23 @@ class SearchGoogleStory(system_health_story.SystemHealthStory): |
| action_runner.Wait(1) |
| action_runner.TapElement(selector=self._RESULT_SELECTOR) |
| action_runner.tab.WaitForDocumentReadyStateToBeComplete() |
| + |
| +class SearchOmniboxStory(system_health_story.SystemHealthStory): |
| + NAME = 'search:google:omnibox' |
| + URL = 'https://www.google.co.in' |
| + SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY |
| + TAGS = [story_tags.EMERGING_MARKET] |
| + |
| + def RunPageInteractions(self, action_runner): |
| + platform = action_runner.tab.browser.platform |
| + package = action_runner.tab.browser.GetBrowserInfo().package_name |
| + platform.system_ui.WaitForUiNode(resource_id=package+':id/url_bar') |
| + url_bar = platform.system_ui.GetUiNode(resource_id=package+':id/url_bar') |
| + url_bar.Tap() |
| + action_runner.Wait(1) |
| + platform.android_action_runner.InputText('drake') |
| + action_runner.Wait(0.5) |
| + platform.android_action_runner.InputKeyEvent(66) |
|
perezju
2017/04/04 09:23:38
use the constant name from:
https://github.com/cat
ssid
2017/04/04 20:59:49
Done.
|
| + |
| + action_runner.WaitForNavigate(15) |
| + action_runner.ScrollPage(use_touch=True, distance=500) |