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

Side by Side Diff: mojo/edk/system/test_utils.cc

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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
« no previous file with comments | « mojo/edk/system/test_utils.h ('k') | mojo/edk/system/transport_data.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "mojo/edk/system/test_utils.h"
6
7 #include "base/test/test_timeouts.h"
8 #include "build/build_config.h"
9
10 namespace mojo {
11 namespace system {
12 namespace test {
13
14 base::TimeDelta EpsilonTimeout() {
15 // Originally, our epsilon timeout was 10 ms, which was mostly fine but flaky on
16 // some Windows bots. I don't recall ever seeing flakes on other bots. At 30 ms
17 // tests seem reliable on Windows bots, but not at 25 ms. We'd like this timeout
18 // to be as small as possible (see the description in the .h file).
19 //
20 // Currently, |tiny_timeout()| is usually 100 ms (possibly scaled under ASAN,
21 // etc.). Based on this, set it to (usually be) 30 ms on Windows and 20 ms
22 // elsewhere.
23 #if defined(OS_WIN) || defined(OS_ANDROID)
24 return (TestTimeouts::tiny_timeout() * 3) / 10;
25 #else
26 return (TestTimeouts::tiny_timeout() * 2) / 10;
27 #endif
28 }
29
30 } // namespace test
31 } // namespace system
32 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/test_utils.h ('k') | mojo/edk/system/transport_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698