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 #include "base/test/test_timeouts.h" | 5 #include "base/test/test_timeouts.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/test/test_switches.h" | 10 #include "base/test/test_switches.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 } | 59 } |
60 initialized_ = true; | 60 initialized_ = true; |
61 | 61 |
62 // Note that these timeouts MUST be initialized in the correct order as | 62 // Note that these timeouts MUST be initialized in the correct order as |
63 // per the CHECKS below. | 63 // per the CHECKS below. |
64 InitializeTimeout(switches::kTestTinyTimeout, &tiny_timeout_ms_); | 64 InitializeTimeout(switches::kTestTinyTimeout, &tiny_timeout_ms_); |
65 InitializeTimeout(switches::kUiTestActionTimeout, tiny_timeout_ms_, | 65 InitializeTimeout(switches::kUiTestActionTimeout, tiny_timeout_ms_, |
66 &action_timeout_ms_); | 66 &action_timeout_ms_); |
67 InitializeTimeout(switches::kUiTestActionMaxTimeout, action_timeout_ms_, | 67 InitializeTimeout(switches::kUiTestActionMaxTimeout, action_timeout_ms_, |
68 &action_max_timeout_ms_); | 68 &action_max_timeout_ms_); |
| 69 // TODO(phajdan.jr): Fix callers and remove kTestTerminateTimeout. |
| 70 InitializeTimeout(switches::kTestTerminateTimeout, &action_max_timeout_ms_); |
69 InitializeTimeout(switches::kTestLargeTimeout, action_max_timeout_ms_, | 71 InitializeTimeout(switches::kTestLargeTimeout, action_max_timeout_ms_, |
70 &large_test_timeout_ms_); | 72 &large_test_timeout_ms_); |
71 InitializeTimeout(switches::kUiTestTimeout, large_test_timeout_ms_, | 73 InitializeTimeout(switches::kUiTestTimeout, large_test_timeout_ms_, |
72 &huge_test_timeout_ms_); | 74 &huge_test_timeout_ms_); |
73 | 75 |
74 // The timeout values should be increasing in the right order. | 76 // The timeout values should be increasing in the right order. |
75 CHECK(tiny_timeout_ms_ <= action_timeout_ms_); | 77 CHECK(tiny_timeout_ms_ <= action_timeout_ms_); |
76 CHECK(action_timeout_ms_ <= action_max_timeout_ms_); | 78 CHECK(action_timeout_ms_ <= action_max_timeout_ms_); |
77 CHECK(action_max_timeout_ms_ <= large_test_timeout_ms_); | 79 CHECK(action_max_timeout_ms_ <= large_test_timeout_ms_); |
78 CHECK(large_test_timeout_ms_ <= huge_test_timeout_ms_); | 80 CHECK(large_test_timeout_ms_ <= huge_test_timeout_ms_); |
79 | 81 |
80 InitializeTimeout(switches::kLiveOperationTimeout, | 82 InitializeTimeout(switches::kLiveOperationTimeout, |
81 &live_operation_timeout_ms_); | 83 &live_operation_timeout_ms_); |
82 } | 84 } |
OLD | NEW |