Chromium Code Reviews| Index: chrome/test/functional/chromoting/auth.py |
| =================================================================== |
| --- chrome/test/functional/chromoting/auth.py (revision 0) |
| +++ chrome/test/functional/chromoting/auth.py (revision 0) |
| @@ -0,0 +1,49 @@ |
| +#!/usr/bin/env python |
| +# Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +import os |
| + |
| +# Add chrome/test/functional to sys.path for importing pyauto_functional |
| +os.sys.path.insert( |
| + 0, |
| + os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) |
| + |
| +import pyauto_functional # Must come before chromoting and pyauto. |
| +import chromoting |
| +import pyauto |
| + |
| +import chromoting_base |
| + |
| + |
| +class ChromotingAuth(chromoting_base.ChromotingBase): |
| + """Chromoting authentication related test cases.""" |
| + |
| + def setUp(self): |
| + """Set up for auth test.""" |
| + super(ChromotingAuth, self).setUp() |
| + |
| + self._app = self.InstallExtension(self.GetWebappPath()) |
| + self.host.LaunchApp(self._app) |
| + self.account = self.GetPrivateInfo()['test_chromoting_account'] |
| + |
| + def testDenyAllowAccess(self): |
| + """Denies access and then allows access.""" |
| + self.host.ContinueAuth() |
| + self.host.LogIn(self.account['username'], self.account['password']) |
| + self.host.DenyAccess() |
| + self.host.ContinueAuth() |
| + self.host.AllowAccess() |
| + |
| + def testSignOutAndSignBackIn(self): |
| + """Signs out from chromoting and signs back in.""" |
| + self.host.ContinueAuth() |
| + self.host.LogIn(self.account['username'], self.account['password']) |
| + self.host.AllowAccess() |
| + self.host.SignOut() |
| + self.host.ContinueAuth() |
| + self.host.AllowAccess() |
| + |
|
Nirnimesh
2012/08/06 19:13:53
need 2 lines at global scope
yihongg
2012/08/08 01:04:48
Done.
|
| +if __name__ == '__main__': |
| + pyauto_functional.Main() |
| Property changes on: chrome/test/functional/chromoting/auth.py |
| ___________________________________________________________________ |
| Added: svn:executable |
| + * |