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

Side by Side Diff: base/test/test_timeouts.cc

Issue 7055007: GTTF: Remove wait_for_terminate_timeout_ms in favor of action_max_timeout_ms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 // The timeout values should increase in the order they appear in this block. 43 // The timeout values should increase in the order they appear in this block.
44 // static 44 // static
45 int TestTimeouts::tiny_timeout_ms_ = 100; 45 int TestTimeouts::tiny_timeout_ms_ = 100;
46 int TestTimeouts::action_timeout_ms_ = 2000; 46 int TestTimeouts::action_timeout_ms_ = 2000;
47 int TestTimeouts::action_max_timeout_ms_ = 25000; 47 int TestTimeouts::action_max_timeout_ms_ = 25000;
48 int TestTimeouts::large_test_timeout_ms_ = 3 * 60 * 1000; 48 int TestTimeouts::large_test_timeout_ms_ = 3 * 60 * 1000;
49 int TestTimeouts::huge_test_timeout_ms_ = 10 * 60 * 1000; 49 int TestTimeouts::huge_test_timeout_ms_ = 10 * 60 * 1000;
50 50
51 // static 51 // static
52 int TestTimeouts::wait_for_terminate_timeout_ms_ = 15000;
53
54 // static
55 int TestTimeouts::live_operation_timeout_ms_ = 45000; 52 int TestTimeouts::live_operation_timeout_ms_ = 45000;
56 53
57 // static 54 // static
58 void TestTimeouts::Initialize() { 55 void TestTimeouts::Initialize() {
59 if (initialized_) { 56 if (initialized_) {
60 NOTREACHED(); 57 NOTREACHED();
61 return; 58 return;
62 } 59 }
63 initialized_ = true; 60 initialized_ = true;
64 61
65 // 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
66 // per the CHECKS below. 63 // per the CHECKS below.
67 InitializeTimeout(switches::kTestTinyTimeout, &tiny_timeout_ms_); 64 InitializeTimeout(switches::kTestTinyTimeout, &tiny_timeout_ms_);
68 InitializeTimeout(switches::kUiTestActionTimeout, tiny_timeout_ms_, 65 InitializeTimeout(switches::kUiTestActionTimeout, tiny_timeout_ms_,
69 &action_timeout_ms_); 66 &action_timeout_ms_);
70 InitializeTimeout(switches::kUiTestActionMaxTimeout, action_timeout_ms_, 67 InitializeTimeout(switches::kUiTestActionMaxTimeout, action_timeout_ms_,
71 &action_max_timeout_ms_); 68 &action_max_timeout_ms_);
72 InitializeTimeout(switches::kTestLargeTimeout, action_max_timeout_ms_, 69 InitializeTimeout(switches::kTestLargeTimeout, action_max_timeout_ms_,
73 &large_test_timeout_ms_); 70 &large_test_timeout_ms_);
74 InitializeTimeout(switches::kUiTestTimeout, large_test_timeout_ms_, 71 InitializeTimeout(switches::kUiTestTimeout, large_test_timeout_ms_,
75 &huge_test_timeout_ms_); 72 &huge_test_timeout_ms_);
76 73
77 // The timeout values should be increasing in the right order. 74 // The timeout values should be increasing in the right order.
78 CHECK(tiny_timeout_ms_ <= action_timeout_ms_); 75 CHECK(tiny_timeout_ms_ <= action_timeout_ms_);
79 CHECK(action_timeout_ms_ <= action_max_timeout_ms_); 76 CHECK(action_timeout_ms_ <= action_max_timeout_ms_);
80 CHECK(action_max_timeout_ms_ <= large_test_timeout_ms_); 77 CHECK(action_max_timeout_ms_ <= large_test_timeout_ms_);
81 CHECK(large_test_timeout_ms_ <= huge_test_timeout_ms_); 78 CHECK(large_test_timeout_ms_ <= huge_test_timeout_ms_);
82 79
83 InitializeTimeout(switches::kUiTestTerminateTimeout,
84 &wait_for_terminate_timeout_ms_);
85
86 InitializeTimeout(switches::kLiveOperationTimeout, 80 InitializeTimeout(switches::kLiveOperationTimeout,
87 &live_operation_timeout_ms_); 81 &live_operation_timeout_ms_);
88 } 82 }
OLDNEW
« no previous file with comments | « base/test/test_timeouts.h ('k') | chrome/browser/service/service_process_control_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698