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

Unified Diff: functional/test_utils.py

Issue 6354004: Fixing search_engines.SearchEnginesTest.testDiscoverSearchEngine (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/test/
Patch Set: '' Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « functional/search_engines.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: functional/test_utils.py
===================================================================
--- functional/test_utils.py (revision 71393)
+++ functional/test_utils.py (working copy)
@@ -6,11 +6,13 @@
import copy
import email
+import logging
import os
import smtplib
import types
import pyauto_functional
+import pyauto
import pyauto_utils
@@ -215,3 +217,17 @@
test.assertTrue(s in content_string, s)
for s in nothave_list:
test.assertTrue(s not in content_string)
+
+
+def CallFunctionWithNewTimeout(self, new_timeout, function):
+ """Sets the timeout to |new_timeout| and calls |function|.
+
+ This method resets the timeout before returning.
+ """
+ timeout_changer = pyauto.PyUITest.CmdExecutionTimeoutChanger(
+ self, new_timeout)
+ logging.info('Automation execution timeout has been changed to %d. '
+ 'If the timeout is large the test might appear to hang.'
+ % new_timeout)
+ function()
+ del timeout_changer
« no previous file with comments | « functional/search_engines.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698