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

Side by Side Diff: chrome/test/functional/chromoting/auth.py

Issue 10821015: Initial checkin of the me2me pyauto automation: (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:executable
+ *
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2012 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 os.sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)) ))
simonmorris 2012/07/30 22:44:24 Add a comment explaining what this does, and why i
yihongg1 2012/08/03 00:40:06 Done.
9
10 import pyauto_functional # Must come before chromoting and pyauto.
11 import chromoting
12 import pyauto
13
14 import chromoting_base
15
Nirnimesh 2012/07/31 20:15:10 Need 2 lines at global scope
yihongg1 2012/08/03 00:40:06 Done.
16 class ChromotingAuth(chromoting_base.ChromotingBase):
17 """Chromoting authentication related test cases."""
18
19 def setUp(self):
20 """Set up for auth test."""
21 super(ChromotingAuth, self).setUp()
22
23 self._app = self.InstallExtension(self.GetWebappPath())
24 self.host.LaunchApp(self._app)
25 self.account = self.GetPrivateInfo()['test_chromoting_account']
26
27 def testDenyAllowAccess(self):
28 """Denies access and then allows access."""
29 self.host.ContinueAuth()
30 self.host.LogIn(self.account['username'], self.account['password'])
31 self.host.DenyAccess()
32 self.host.ContinueAuth()
33 self.host.AllowAccess()
34
35 def testSignOutAndSignBackIn(self):
36 """Signs out from chromoting and signs back in."""
37 self.host.ContinueAuth()
38 self.host.LogIn(self.account['username'], self.account['password'])
39 self.host.AllowAccess()
40 self.host.SignOut()
41 self.host.ContinueAuth()
42 self.host.AllowAccess()
43
44 if __name__ == '__main__':
45 pyauto_functional.Main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698