| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_TEST_TEST_TIMEOUTS_H_ | 5 #ifndef BASE_TEST_TEST_TIMEOUTS_H_ |
| 6 #define BASE_TEST_TEST_TIMEOUTS_H_ | 6 #define BASE_TEST_TEST_TIMEOUTS_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 DCHECK(initialized_); | 36 DCHECK(initialized_); |
| 37 return action_max_timeout_ms_; | 37 return action_max_timeout_ms_; |
| 38 } | 38 } |
| 39 | 39 |
| 40 // Timeout for a large test that may take a few minutes to run. | 40 // Timeout for a large test that may take a few minutes to run. |
| 41 static int large_test_timeout_ms() { | 41 static int large_test_timeout_ms() { |
| 42 DCHECK(initialized_); | 42 DCHECK(initialized_); |
| 43 return large_test_timeout_ms_; | 43 return large_test_timeout_ms_; |
| 44 } | 44 } |
| 45 | 45 |
| 46 // Timeout for a huge test (like running a layout test inside the browser). | |
| 47 // Do not use unless absolutely necessary - try to make the test smaller. | |
| 48 // Do not use multiple times in a single test. | |
| 49 static int huge_test_timeout_ms() { | |
| 50 DCHECK(initialized_); | |
| 51 return large_test_timeout_ms_; | |
| 52 } | |
| 53 | |
| 54 // Timeout to wait for a live operation to complete. Used by tests that access | |
| 55 // external services. | |
| 56 static int live_operation_timeout_ms() { | |
| 57 DCHECK(initialized_); | |
| 58 return action_max_timeout_ms_; | |
| 59 } | |
| 60 | |
| 61 private: | 46 private: |
| 62 static bool initialized_; | 47 static bool initialized_; |
| 63 | 48 |
| 64 static int tiny_timeout_ms_; | 49 static int tiny_timeout_ms_; |
| 65 static int action_timeout_ms_; | 50 static int action_timeout_ms_; |
| 66 static int action_max_timeout_ms_; | 51 static int action_max_timeout_ms_; |
| 67 static int large_test_timeout_ms_; | 52 static int large_test_timeout_ms_; |
| 68 | 53 |
| 69 DISALLOW_IMPLICIT_CONSTRUCTORS(TestTimeouts); | 54 DISALLOW_IMPLICIT_CONSTRUCTORS(TestTimeouts); |
| 70 }; | 55 }; |
| 71 | 56 |
| 72 #endif // BASE_TEST_TEST_TIMEOUTS_H_ | 57 #endif // BASE_TEST_TEST_TIMEOUTS_H_ |
| OLD | NEW |