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

Side by Side Diff: test_utils.py

Issue 7043026: Added 3 more functions in popups.py (Closed) Base URL: http://src.chromium.org/svn/trunk/src/chrome/test/functional/
Patch Set: '' Created 9 years, 7 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
« popups.py ('K') | « popups.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import copy 7 import copy
8 import email 8 import email
9 import logging 9 import logging
10 import os 10 import os
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 227
228 This method resets the timeout before returning. 228 This method resets the timeout before returning.
229 """ 229 """
230 timeout_changer = pyauto.PyUITest.ActionTimeoutChanger( 230 timeout_changer = pyauto.PyUITest.ActionTimeoutChanger(
231 self, new_timeout) 231 self, new_timeout)
232 logging.info('Automation execution timeout has been changed to %d. ' 232 logging.info('Automation execution timeout has been changed to %d. '
233 'If the timeout is large the test might appear to hang.' 233 'If the timeout is large the test might appear to hang.'
234 % new_timeout) 234 % new_timeout)
235 function() 235 function()
236 del timeout_changer 236 del timeout_changer
237
238 def GetOmniboxMatchesFor(self, text, windex=0, attr_dict=None):
239 """Fetch omnibox matches with the given attributes for the given query.
240
241 Args:
242 text: the query text to use
243 windex: the window index to work on. Defaults to 0 (first window)
244 attr_dict: the dictionary of properties to be satisfied
245
246 Returns:
247 a list of match items
248 """
249 self.SetOmniboxText(text, windex=windex)
250 self.WaitUntilOmniboxQueryDone(windex=windex)
251 if not attr_dict:
252 matches = self.GetOmniboxInfo(windex=windex).Matches()
253 else:
254 matches = self.GetOmniboxInfo(windex=windex).MatchesWithAttributes(
255 attr_dict=attr_dict)
256 return matches
OLDNEW
« popups.py ('K') | « popups.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698