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

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

Issue 15663007: Revert "GTTF: Lower the action max timeout to 30s for everyone." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/test/test_switches.h" 10 #include "base/test/test_switches.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 } // namespace 50 } // namespace
51 51
52 // static 52 // static
53 bool TestTimeouts::initialized_ = false; 53 bool TestTimeouts::initialized_ = false;
54 54
55 // The timeout values should increase in the order they appear in this block. 55 // The timeout values should increase in the order they appear in this block.
56 // static 56 // static
57 int TestTimeouts::tiny_timeout_ms_ = 100; 57 int TestTimeouts::tiny_timeout_ms_ = 100;
58 int TestTimeouts::action_timeout_ms_ = 10000; 58 int TestTimeouts::action_timeout_ms_ = 10000;
59 #ifndef NDEBUG
60 int TestTimeouts::action_max_timeout_ms_ = 45000;
61 #else
59 int TestTimeouts::action_max_timeout_ms_ = 30000; 62 int TestTimeouts::action_max_timeout_ms_ = 30000;
63 #endif // NDEBUG
60 int TestTimeouts::large_test_timeout_ms_ = 10 * 60 * 1000; 64 int TestTimeouts::large_test_timeout_ms_ = 10 * 60 * 1000;
61 65
62 // static 66 // static
63 void TestTimeouts::Initialize() { 67 void TestTimeouts::Initialize() {
64 if (initialized_) { 68 if (initialized_) {
65 NOTREACHED(); 69 NOTREACHED();
66 return; 70 return;
67 } 71 }
68 initialized_ = true; 72 initialized_ = true;
69 73
70 // Note that these timeouts MUST be initialized in the correct order as 74 // Note that these timeouts MUST be initialized in the correct order as
71 // per the CHECKS below. 75 // per the CHECKS below.
72 InitializeTimeout(switches::kTestTinyTimeout, &tiny_timeout_ms_); 76 InitializeTimeout(switches::kTestTinyTimeout, &tiny_timeout_ms_);
73 InitializeTimeout(switches::kUiTestActionTimeout, tiny_timeout_ms_, 77 InitializeTimeout(switches::kUiTestActionTimeout, tiny_timeout_ms_,
74 &action_timeout_ms_); 78 &action_timeout_ms_);
75 InitializeTimeout(switches::kUiTestActionMaxTimeout, action_timeout_ms_, 79 InitializeTimeout(switches::kUiTestActionMaxTimeout, action_timeout_ms_,
76 &action_max_timeout_ms_); 80 &action_max_timeout_ms_);
77 InitializeTimeout(switches::kTestLargeTimeout, action_max_timeout_ms_, 81 InitializeTimeout(switches::kTestLargeTimeout, action_max_timeout_ms_,
78 &large_test_timeout_ms_); 82 &large_test_timeout_ms_);
79 83
80 // The timeout values should be increasing in the right order. 84 // The timeout values should be increasing in the right order.
81 CHECK(tiny_timeout_ms_ <= action_timeout_ms_); 85 CHECK(tiny_timeout_ms_ <= action_timeout_ms_);
82 CHECK(action_timeout_ms_ <= action_max_timeout_ms_); 86 CHECK(action_timeout_ms_ <= action_max_timeout_ms_);
83 CHECK(action_max_timeout_ms_ <= large_test_timeout_ms_); 87 CHECK(action_max_timeout_ms_ <= large_test_timeout_ms_);
84 } 88 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698