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

Unified Diff: chrome/test/pyautolib/pyauto.py

Issue 3266012: Fetch info about the state of navigation in a tab (Closed)
Patch Set: add ssl.py Created 10 years, 4 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
« chrome/test/functional/ssl.py ('K') | « chrome/test/functional/ssl.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/pyauto.py
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index 0d4f6675c4fb7464a4fa49cf8e1bd2b6ed6e8d70..36778515cf96dbaacf410f407f8ee2006053c5d4 100644
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -728,6 +728,40 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
}
return self._GetResultFromJSONRequest(cmd_dict)
+ def GetNavigationInfo(self, tab_index=0, windex=0):
+ """Get info about the navigation state of a given tab.
+
+ Args:
+ tab_index: The tab index, default is 0.
+ window_index: The window index, default is 0.
+
+ Returns:
+ a dictionary.
+ Sample:
+
+ { u'favicon_url': u'https://www.google.com/favicon.ico',
+ u'page_type': u'NORMAL_PAGE',
+ u'ssl': { u'displayed_insecure_content': False,
+ u'ran_insecure_content': False,
+ u'security_style': u'SECURITY_STYLE_AUTHENTICATED'}}
+
+ Values for security_style can be:
+ SECURITY_STYLE_UNKNOWN
+ SECURITY_STYLE_UNAUTHENTICATED
+ SECURITY_STYLE_AUTHENTICATION_BROKEN
+ SECURITY_STYLE_AUTHENTICATED
+
+ Values for page_type can be:
+ NORMAL_PAGE
+ ERROR_PAGE
+ INTERSTITIAL_PAGE
+ """
+ cmd_dict = { # Prepare command for the json interface
+ 'command': 'GetNavigationInfo',
+ 'tab_index': tab_index,
+ }
+ return self._GetResultFromJSONRequest(cmd_dict, windex=windex)
+
def GetHistoryInfo(self, search_text=''):
"""Return info about browsing history.
« chrome/test/functional/ssl.py ('K') | « chrome/test/functional/ssl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698