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

Side by Side Diff: remoting/jingle_glue/jingle_thread_unittest.cc

Issue 5977010: Move CancellationFlag and WaitableEvent to the synchronization subdirectory.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « remoting/jingle_glue/jingle_thread.h ('k') | remoting/protocol/jingle_session_unittest.cc » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/time.h" 6 #include "base/time.h"
7 #include "base/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "remoting/jingle_glue/jingle_thread.h" 8 #include "remoting/jingle_glue/jingle_thread.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace remoting { 12 namespace remoting {
13 13
14 class MockTask : public Task { 14 class MockTask : public Task {
15 public: 15 public:
16 MOCK_METHOD0(Run, void()); 16 MOCK_METHOD0(Run, void());
17 }; 17 };
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 base::Time start = base::Time::Now(); 73 base::Time start = base::Time::Now();
74 thread.message_loop()->PostNonNestableDelayedTask(FROM_HERE, task, kDelayMs); 74 thread.message_loop()->PostNonNestableDelayedTask(FROM_HERE, task, kDelayMs);
75 event.TimedWait(base::TimeDelta::FromMilliseconds(kDelayTimeoutMs)); 75 event.TimedWait(base::TimeDelta::FromMilliseconds(kDelayTimeoutMs));
76 base::Time end = base::Time::Now(); 76 base::Time end = base::Time::Now();
77 thread.Stop(); 77 thread.Stop();
78 78
79 EXPECT_GE((end - start).InMillisecondsRoundedUp(), kDelayMs); 79 EXPECT_GE((end - start).InMillisecondsRoundedUp(), kDelayMs);
80 } 80 }
81 81
82 } // namespace remoting 82 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/jingle_glue/jingle_thread.h ('k') | remoting/protocol/jingle_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698