Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(717)

Side by Side Diff: tools/perf/page_sets/system_health/searching_stories.py

Issue 2228103002: [system-health] Add support for disabling individual stories on individual platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
6 from page_sets.system_health import system_health_story 5 from page_sets.system_health import system_health_story
7 6
7 from telemetry import decorators
8 8
9
10 @decorators.Disabled('win') # http://crbug.com/642463
9 class SearchGoogleStory(system_health_story.SystemHealthStory): 11 class SearchGoogleStory(system_health_story.SystemHealthStory):
10 NAME = 'search:portal:google' 12 NAME = 'search:portal:google'
11 URL = 'https://www.google.co.uk/' 13 URL = 'https://www.google.co.uk/'
12 # Tap simulation doesn't fully work on Windows. http://crbug.com/634343
13 SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY
14 14
15 _SEARCH_BOX_SELECTOR = 'input[aria-label="Search"]' 15 _SEARCH_BOX_SELECTOR = 'input[aria-label="Search"]'
16 _RESULT_SELECTOR = '.r > a[href*="wikipedia"]' 16 _RESULT_SELECTOR = '.r > a[href*="wikipedia"]'
17 17
18 def _DidLoadDocument(self, action_runner): 18 def _DidLoadDocument(self, action_runner):
19 # Click on the search box. 19 # Click on the search box.
20 action_runner.Wait(1) 20 action_runner.Wait(1)
21 action_runner.WaitForElement(selector=self._SEARCH_BOX_SELECTOR) 21 action_runner.WaitForElement(selector=self._SEARCH_BOX_SELECTOR)
22 action_runner.TapElement(selector=self._SEARCH_BOX_SELECTOR) 22 action_runner.TapElement(selector=self._SEARCH_BOX_SELECTOR)
23 23
(...skipping 15 matching lines...) Expand all
39 })()''' % self._RESULT_SELECTOR) 39 })()''' % self._RESULT_SELECTOR)
40 while action_runner.EvaluateJavaScript(result_visible_expression): 40 while action_runner.EvaluateJavaScript(result_visible_expression):
41 action_runner.RepeatableBrowserDrivenScroll(y_scroll_distance_ratio=0.75, 41 action_runner.RepeatableBrowserDrivenScroll(y_scroll_distance_ratio=0.75,
42 prevent_fling=False) 42 prevent_fling=False)
43 action_runner.Wait(0.2) 43 action_runner.Wait(0.2)
44 44
45 # Click on the Wikipedia result. 45 # Click on the Wikipedia result.
46 action_runner.Wait(1) 46 action_runner.Wait(1)
47 action_runner.TapElement(selector=self._RESULT_SELECTOR) 47 action_runner.TapElement(selector=self._RESULT_SELECTOR)
48 action_runner.tab.WaitForDocumentReadyStateToBeComplete() 48 action_runner.tab.WaitForDocumentReadyStateToBeComplete()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698