| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import os | 6 import os |
| 7 import subprocess | 7 import subprocess |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 import pyauto_functional # Must be imported before pyauto | 10 import pyauto_functional # Must be imported before pyauto |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 This test is to verify the stability of the automation interface. | 149 This test is to verify the stability of the automation interface. |
| 150 | 150 |
| 151 """ | 151 """ |
| 152 self.testGoodLogin() | 152 self.testGoodLogin() |
| 153 self.Logout() | 153 self.Logout() |
| 154 self.testBadPassword() | 154 self.testBadPassword() |
| 155 self.testLoginAsGuest() | 155 self.testLoginAsGuest() |
| 156 self.Logout() | 156 self.Logout() |
| 157 self.testLoginToCreateNewAccount() | 157 self.testLoginToCreateNewAccount() |
| 158 | 158 |
| 159 def testLogoutWithNoWindows(self): |
| 160 """Verify logout when no browser windows are present.""" |
| 161 self.testGoodLogin() |
| 162 for i in range(5): |
| 163 self.OpenNewBrowserWindow(True) |
| 164 for _ in range(self.GetBrowserWindowCount()): |
| 165 self.CloseBrowserWindow(0) |
| 166 self.assertEqual(0, self.GetBrowserWindowCount(), |
| 167 msg='Could not close all browser windows') |
| 168 self.Logout() |
| 169 self.testGoodLogin() |
| 170 |
| 159 | 171 |
| 160 if __name__ == '__main__': | 172 if __name__ == '__main__': |
| 161 pyauto_functional.Main() | 173 pyauto_functional.Main() |
| OLD | NEW |