| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 import copy | 7 import copy |
| 8 import email | 8 import email |
| 9 import logging | 9 import logging |
| 10 import os | 10 import os |
| 11 import smtplib | 11 import smtplib |
| 12 import types | 12 import types |
| 13 | 13 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 test.assertTrue(s in content_string, s) | 217 test.assertTrue(s in content_string, s) |
| 218 for s in nothave_list: | 218 for s in nothave_list: |
| 219 test.assertTrue(s not in content_string) | 219 test.assertTrue(s not in content_string) |
| 220 | 220 |
| 221 | 221 |
| 222 def CallFunctionWithNewTimeout(self, new_timeout, function): | 222 def CallFunctionWithNewTimeout(self, new_timeout, function): |
| 223 """Sets the timeout to |new_timeout| and calls |function|. | 223 """Sets the timeout to |new_timeout| and calls |function|. |
| 224 | 224 |
| 225 This method resets the timeout before returning. | 225 This method resets the timeout before returning. |
| 226 """ | 226 """ |
| 227 timeout_changer = pyauto.PyUITest.CmdExecutionTimeoutChanger( | 227 timeout_changer = pyauto.PyUITest.ActionTimeoutChanger( |
| 228 self, new_timeout) | 228 self, new_timeout) |
| 229 logging.info('Automation execution timeout has been changed to %d. ' | 229 logging.info('Automation execution timeout has been changed to %d. ' |
| 230 'If the timeout is large the test might appear to hang.' | 230 'If the timeout is large the test might appear to hang.' |
| 231 % new_timeout) | 231 % new_timeout) |
| 232 function() | 232 function() |
| 233 del timeout_changer | 233 del timeout_changer |
| OLD | NEW |