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

Side by Side Diff: tools/telemetry/telemetry/click_element_action.py

Issue 12294002: Revert 182991 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 from telemetry import inspector_runtime 4 from telemetry import inspector_runtime
5 from telemetry import page as page_module 5 from telemetry import page as page_module
6 from telemetry import page_action 6 from telemetry import page_action
7 from telemetry import util 7 from telemetry import util
8 8
9 class ClickElementAction(page_action.PageAction): 9 class ClickElementAction(page_action.PageAction):
10 def __init__(self, attributes=None): 10 def __init__(self, attributes=None):
(...skipping 22 matching lines...) Expand all
33 elif hasattr(self, 'wait_for_href_change'): 33 elif hasattr(self, 'wait_for_href_change'):
34 old_url = tab.EvaluateJavaScript('document.location.href') 34 old_url = tab.EvaluateJavaScript('document.location.href')
35 DoClick() 35 DoClick()
36 util.WaitFor(lambda: tab.EvaluateJavaScript( 36 util.WaitFor(lambda: tab.EvaluateJavaScript(
37 'document.location.href') != old_url, 60) 37 'document.location.href') != old_url, 60)
38 else: 38 else:
39 DoClick() 39 DoClick()
40 40
41 page_module.Page.WaitForPageToLoad(self, tab, 60) 41 page_module.Page.WaitForPageToLoad(self, tab, 60)
42 tab.WaitForDocumentReadyStateToBeInteractiveOrBetter() 42 tab.WaitForDocumentReadyStateToBeInteractiveOrBetter()
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/chromeos_login_ext/manifest.json ('k') | tools/telemetry/telemetry/click_element_action_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698