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

Unified Diff: base/test/test_timeouts.cc

Issue 2532793002: Add a TestBrowserDialog helper class for testing browser dialogs in a consistent way. (Closed)
Patch Set: Comment example. Use TestNameWithoutDisabledPrefix Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/test/test_timeouts.h ('k') | chrome/browser/ui/autofill/card_unmask_prompt_view_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_timeouts.cc
diff --git a/base/test/test_timeouts.cc b/base/test/test_timeouts.cc
index 55e9a798613404610c2de68442af2f5911e1d3e0..0dc0f49deeb225dcc9f9cf8ed8c5f773d93d5f70 100644
--- a/base/test/test_timeouts.cc
+++ b/base/test/test_timeouts.cc
@@ -46,7 +46,10 @@ void InitializeTimeout(const char* switch_name, int min_value, int* value) {
std::string string_value(base::CommandLine::ForCurrentProcess()->
GetSwitchValueASCII(switch_name));
int timeout;
- base::StringToInt(string_value, &timeout);
+ if (string_value == TestTimeouts::kNoTimeoutSwitchValue)
+ timeout = kAlmostInfiniteTimeoutMs;
+ else
+ base::StringToInt(string_value, &timeout);
*value = std::max(*value, timeout);
}
*value *= kTimeoutMultiplier;
@@ -65,6 +68,9 @@ void InitializeTimeout(const char* switch_name, int* value) {
} // namespace
// static
+constexpr const char TestTimeouts::kNoTimeoutSwitchValue[];
+
+// static
bool TestTimeouts::initialized_ = false;
// The timeout values should increase in the order they appear in this block.
« no previous file with comments | « base/test/test_timeouts.h ('k') | chrome/browser/ui/autofill/card_unmask_prompt_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698