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

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

Issue 8653002: Revert 111074 - ASAN timeout on OutOfProcessPPAPITest.* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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/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"
11 11
12 namespace { 12 namespace {
13 13
14 #ifdef ADDRESS_SANITIZER 14 #ifdef ADDRESS_SANITIZER
15 static const int kTimeoutMultiplier = 4; 15 static const int kTimeoutMultiplier = 2;
16 #else 16 #else
17 static const int kTimeoutMultiplier = 1; 17 static const int kTimeoutMultiplier = 1;
18 #endif 18 #endif
19 19
20 // Sets value to the greatest of: 20 // Sets value to the greatest of:
21 // 1) value's current value multiplied by kTimeoutMultiplier (assuming 21 // 1) value's current value multiplied by kTimeoutMultiplier (assuming
22 // InitializeTimeout is called only once per value). 22 // InitializeTimeout is called only once per value).
23 // 2) min_value. 23 // 2) min_value.
24 // 3) the numerical value given by switch_name on the command line multiplied 24 // 3) the numerical value given by switch_name on the command line multiplied
25 // by kTimeoutMultiplier. 25 // by kTimeoutMultiplier.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 InitializeTimeout(switches::kUiTestActionMaxTimeout, action_timeout_ms_, 73 InitializeTimeout(switches::kUiTestActionMaxTimeout, action_timeout_ms_,
74 &action_max_timeout_ms_); 74 &action_max_timeout_ms_);
75 InitializeTimeout(switches::kTestLargeTimeout, action_max_timeout_ms_, 75 InitializeTimeout(switches::kTestLargeTimeout, action_max_timeout_ms_,
76 &large_test_timeout_ms_); 76 &large_test_timeout_ms_);
77 77
78 // The timeout values should be increasing in the right order. 78 // The timeout values should be increasing in the right order.
79 CHECK(tiny_timeout_ms_ <= action_timeout_ms_); 79 CHECK(tiny_timeout_ms_ <= action_timeout_ms_);
80 CHECK(action_timeout_ms_ <= action_max_timeout_ms_); 80 CHECK(action_timeout_ms_ <= action_max_timeout_ms_);
81 CHECK(action_max_timeout_ms_ <= large_test_timeout_ms_); 81 CHECK(action_max_timeout_ms_ <= large_test_timeout_ms_);
82 } 82 }
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