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

Side by Side Diff: chrome/test/functional/ssl.py

Issue 3266012: Fetch info about the state of navigation in a tab (Closed)
Patch Set: add ssl.py Created 10 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
(Empty)
1 #!/usr/bin/python
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import os
7
8 import pyauto_functional # Must be imported before pyauto
9 import pyauto
10
11
12 class SSLTest(pyauto.PyUITest):
13 """TestCase for SSL."""
14
15 def Debug(self):
16 """Test method for experimentation.
17
18 This method will not run automatically.
19 Use: python chrome/test/functional/ssl.py ssl.SSLTest.Debug
20 """
21 import pprint
22 pp = pprint.PrettyPrinter(indent=2)
23 while True:
24 raw_input('Hit <enter> to dump info.. ')
25 info = self.GetNavigationInfo()
26 pp.pprint(info)
27
28 def testSSLPageBasic(self):
29 """Verify the navigation state in an https page."""
30 self.NavigateToURL('https://www.google.com')
31 ssl = self.GetNavigationInfo()['ssl']
32 security_style = ssl['security_style']
33 self.assertEqual('SECURITY_STYLE_AUTHENTICATED', security_style)
34 self.assertFalse(ssl["displayed_insecure_content"])
John Grabowski 2010/08/31 05:51:16 you switched from ' to " in the middle of this fun
35 self.assertFalse(ssl["ran_insecure_content"])
36
37
38 if __name__ == '__main__':
39 pyauto_functional.Main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698