OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
10 #include "remoting/jingle_glue/jingle_thread.h" | 10 #include "remoting/jingle_glue/jingle_thread.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 FROM_HERE, base::Bind(&MockCallback::Run, base::Unretained(&task)), | 83 FROM_HERE, base::Bind(&MockCallback::Run, base::Unretained(&task)), |
84 base::TimeDelta::FromMilliseconds(kDelayMs)); | 84 base::TimeDelta::FromMilliseconds(kDelayMs)); |
85 event.TimedWait(base::TimeDelta::FromMilliseconds(kDelayTimeoutMs)); | 85 event.TimedWait(base::TimeDelta::FromMilliseconds(kDelayTimeoutMs)); |
86 base::Time end = base::Time::Now(); | 86 base::Time end = base::Time::Now(); |
87 thread.Stop(); | 87 thread.Stop(); |
88 | 88 |
89 EXPECT_GE((end - start).InMillisecondsRoundedUp(), kDelayMs); | 89 EXPECT_GE((end - start).InMillisecondsRoundedUp(), kDelayMs); |
90 } | 90 } |
91 | 91 |
92 } // namespace remoting | 92 } // namespace remoting |
OLD | NEW |