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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « popups.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test_utils.py
===================================================================
--- test_utils.py (revision 86159)
+++ test_utils.py (working copy)
@@ -236,7 +236,26 @@
function()
del timeout_changer
+def GetOmniboxMatchesFor(self, text, windex=0, attr_dict=None):
+ """Fetch omnibox matches with the given attributes for the given query.
+ Args:
+ text: the query text to use
+ windex: the window index to work on. Defaults to 0 (first window)
+ attr_dict: the dictionary of properties to be satisfied
+
+ Returns:
+ a list of match items
+ """
+ self.SetOmniboxText(text, windex=windex)
+ self.WaitUntilOmniboxQueryDone(windex=windex)
+ if not attr_dict:
+ matches = self.GetOmniboxInfo(windex=windex).Matches()
+ else:
+ matches = self.GetOmniboxInfo(windex=windex).MatchesWithAttributes(
+ attr_dict=attr_dict)
+ return matches
+
def GetMemoryUsageOfProcess(pid):
"""Queries the system for the current memory usage of a specified process.
« no previous file with comments | « popups.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698