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: mojo/edk/system/test_utils.cc

Issue 782693004: Update mojo sdk to rev f6c8ec07c01deebc13178d516225fd12695c3dc2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hack mojo_system_impl gypi for android :| Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 "mojo/edk/system/test_utils.h" 5 #include "mojo/edk/system/test_utils.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 24 matching lines...) Expand all
35 35
36 base::TimeDelta EpsilonTimeout() { 36 base::TimeDelta EpsilonTimeout() {
37 // Originally, our epsilon timeout was 10 ms, which was mostly fine but flaky on 37 // Originally, our epsilon timeout was 10 ms, which was mostly fine but flaky on
38 // some Windows bots. I don't recall ever seeing flakes on other bots. At 30 ms 38 // some Windows bots. I don't recall ever seeing flakes on other bots. At 30 ms
39 // tests seem reliable on Windows bots, but not at 25 ms. We'd like this timeout 39 // tests seem reliable on Windows bots, but not at 25 ms. We'd like this timeout
40 // to be as small as possible (see the description in the .h file). 40 // to be as small as possible (see the description in the .h file).
41 // 41 //
42 // Currently, |tiny_timeout()| is usually 100 ms (possibly scaled under ASAN, 42 // Currently, |tiny_timeout()| is usually 100 ms (possibly scaled under ASAN,
43 // etc.). Based on this, set it to (usually be) 30 ms on Windows and 20 ms 43 // etc.). Based on this, set it to (usually be) 30 ms on Windows and 20 ms
44 // elsewhere. 44 // elsewhere.
45 #if defined(OS_WIN) 45 #if defined(OS_WIN) || defined(OS_ANDROID)
46 return (TestTimeouts::tiny_timeout() * 3) / 10; 46 return (TestTimeouts::tiny_timeout() * 3) / 10;
47 #else 47 #else
48 return (TestTimeouts::tiny_timeout() * 2) / 10; 48 return (TestTimeouts::tiny_timeout() * 2) / 10;
49 #endif 49 #endif
50 } 50 }
51 51
52 } // namespace test 52 } // namespace test
53 } // namespace system 53 } // namespace system
54 } // namespace mojo 54 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698