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

Side by Side Diff: chrome/test/test_timeouts.h

Issue 3391026: Remove sleep_timeout from TestTimeouts. (Closed)
Patch Set: Created 10 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_TEST_TEST_TIMEOUTS_H_ 5 #ifndef CHROME_TEST_TEST_TIMEOUTS_H_
6 #define CHROME_TEST_TEST_TIMEOUTS_H_ 6 #define CHROME_TEST_TEST_TIMEOUTS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 // Returns common timeouts to use in tests. Makes it possible to adjust 10 // Returns common timeouts to use in tests. Makes it possible to adjust
(...skipping 14 matching lines...) Expand all
25 static int action_max_timeout_ms() { return action_max_timeout_ms_; } 25 static int action_max_timeout_ms() { return action_max_timeout_ms_; }
26 26
27 // Timeout for a large test that may take a few minutes to run. 27 // Timeout for a large test that may take a few minutes to run.
28 static int large_test_timeout_ms() { return large_test_timeout_ms_; } 28 static int large_test_timeout_ms() { return large_test_timeout_ms_; }
29 29
30 // Timeout for a huge test (like running a layout test inside the browser). 30 // Timeout for a huge test (like running a layout test inside the browser).
31 // Do not use unless absolutely necessary - try to make the test smaller. 31 // Do not use unless absolutely necessary - try to make the test smaller.
32 // Do not use multiple times in a single test. 32 // Do not use multiple times in a single test.
33 static int huge_test_timeout_ms() { return huge_test_timeout_ms_; } 33 static int huge_test_timeout_ms() { return huge_test_timeout_ms_; }
34 34
35 // Timeout used when calling Sleep. Deprecated (recommended
36 // replacement is action_timeout_ms).
37 // TODO(phajdan.jr): Remove sleep_timeout_ms.
38 static int sleep_timeout_ms() { return sleep_timeout_ms_; }
39
40 // Timeout to use for AutomationProxy. Do not use in other places. 35 // Timeout to use for AutomationProxy. Do not use in other places.
41 // TODO(phajdan.jr): Remove command_execution_timeout_ms. 36 // TODO(phajdan.jr): Remove command_execution_timeout_ms.
42 static int command_execution_timeout_ms() { 37 static int command_execution_timeout_ms() {
43 return command_execution_timeout_ms_; 38 return command_execution_timeout_ms_;
44 } 39 }
45 40
46 // Timeout to wait for a process to terminate. 41 // Timeout to wait for a process to terminate.
47 static int wait_for_terminate_timeout_ms() { 42 static int wait_for_terminate_timeout_ms() {
48 return wait_for_terminate_timeout_ms_; 43 return wait_for_terminate_timeout_ms_;
49 } 44 }
50 45
51 // Timeout to wait for a live operation to complete. Used by tests that access 46 // Timeout to wait for a live operation to complete. Used by tests that access
52 // external services. 47 // external services.
53 static int live_operation_timeout_ms() { 48 static int live_operation_timeout_ms() {
54 return live_operation_timeout_ms_; 49 return live_operation_timeout_ms_;
55 } 50 }
56 51
57 private: 52 private:
58 static bool initialized_; 53 static bool initialized_;
59 54
60 static int action_timeout_ms_; 55 static int action_timeout_ms_;
61 static int action_max_timeout_ms_; 56 static int action_max_timeout_ms_;
62 static int large_test_timeout_ms_; 57 static int large_test_timeout_ms_;
63 static int huge_test_timeout_ms_; 58 static int huge_test_timeout_ms_;
64 static int sleep_timeout_ms_;
65 static int command_execution_timeout_ms_; 59 static int command_execution_timeout_ms_;
66 static int wait_for_terminate_timeout_ms_; 60 static int wait_for_terminate_timeout_ms_;
67 static int live_operation_timeout_ms_; 61 static int live_operation_timeout_ms_;
68 62
69 DISALLOW_IMPLICIT_CONSTRUCTORS(TestTimeouts); 63 DISALLOW_IMPLICIT_CONSTRUCTORS(TestTimeouts);
70 }; 64 };
71 65
72 #endif // CHROME_TEST_TEST_TIMEOUTS_H_ 66 #endif // CHROME_TEST_TEST_TIMEOUTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698