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

Side by Side Diff: mojo/edk/system/test/test_io_thread.cc

Issue 1427633003: Move scoped_test_dir.* and test_io_thread.* from edk/test to edk/system/test. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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/test_io_thread.h ('k') | mojo/edk/test/BUILD.gn » ('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 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/test/test_io_thread.h" 5 #include "mojo/edk/system/test/test_io_thread.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/location.h" 9 #include "base/location.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 namespace system {
13 namespace test { 14 namespace test {
14 15
15 namespace { 16 namespace {
16 17
17 void PostTaskAndWaitHelper(base::WaitableEvent* event, 18 void PostTaskAndWaitHelper(base::WaitableEvent* event,
18 const base::Closure& task) { 19 const base::Closure& task) {
19 task.Run(); 20 task.Run();
20 event->Signal(); 21 event->Signal();
21 } 22 }
22 23
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 57 }
57 58
58 void TestIOThread::PostTaskAndWait(const base::Closure& task) { 59 void TestIOThread::PostTaskAndWait(const base::Closure& task) {
59 base::WaitableEvent event(false, false); 60 base::WaitableEvent event(false, false);
60 task_runner()->PostTask(tracked_objects::Location(), 61 task_runner()->PostTask(tracked_objects::Location(),
61 base::Bind(&PostTaskAndWaitHelper, &event, task)); 62 base::Bind(&PostTaskAndWaitHelper, &event, task));
62 event.Wait(); 63 event.Wait();
63 } 64 }
64 65
65 } // namespace test 66 } // namespace test
67 } // namespace system
66 } // namespace mojo 68 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/test/test_io_thread.h ('k') | mojo/edk/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698