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

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

Issue 1426343002: EDK: Move mutex.*, cond_var.*, and thread_annotations.h to //mojo/edk/util. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: oops 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/simple_dispatcher.h ('k') | mojo/edk/system/slave_connection_manager.h » ('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 // NOTE(vtl): Some of these tests are inherently flaky (e.g., if run on a 5 // NOTE(vtl): Some of these tests are inherently flaky (e.g., if run on a
6 // heavily-loaded system). Sorry. |test::EpsilonTimeout()| may be increased to 6 // heavily-loaded system). Sorry. |test::EpsilonTimeout()| may be increased to
7 // increase tolerance and reduce observed flakiness (though doing so reduces the 7 // increase tolerance and reduce observed flakiness (though doing so reduces the
8 // meaningfulness of the test). 8 // meaningfulness of the test).
9 9
10 #include "mojo/edk/system/simple_dispatcher.h" 10 #include "mojo/edk/system/simple_dispatcher.h"
11 11
12 #include <memory> 12 #include <memory>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "mojo/edk/system/test/sleep.h" 16 #include "mojo/edk/system/test/sleep.h"
17 #include "mojo/edk/system/test/stopwatch.h" 17 #include "mojo/edk/system/test/stopwatch.h"
18 #include "mojo/edk/system/test/timeouts.h" 18 #include "mojo/edk/system/test/timeouts.h"
19 #include "mojo/edk/system/thread_annotations.h"
20 #include "mojo/edk/system/waiter.h" 19 #include "mojo/edk/system/waiter.h"
21 #include "mojo/edk/system/waiter_test_utils.h" 20 #include "mojo/edk/system/waiter_test_utils.h"
22 #include "mojo/edk/util/make_unique.h" 21 #include "mojo/edk/util/make_unique.h"
23 #include "mojo/edk/util/ref_ptr.h" 22 #include "mojo/edk/util/ref_ptr.h"
23 #include "mojo/edk/util/thread_annotations.h"
24 #include "mojo/public/cpp/system/macros.h" 24 #include "mojo/public/cpp/system/macros.h"
25 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
26 26
27 using mojo::util::MakeRefCounted; 27 using mojo::util::MakeRefCounted;
28 using mojo::util::MutexLocker;
28 using mojo::util::RefPtr; 29 using mojo::util::RefPtr;
29 30
30 namespace mojo { 31 namespace mojo {
31 namespace system { 32 namespace system {
32 namespace { 33 namespace {
33 34
34 class MockSimpleDispatcher final : public SimpleDispatcher { 35 class MockSimpleDispatcher final : public SimpleDispatcher {
35 public: 36 public:
36 // Note: Use |MakeRefCounted<MockSimpleDispatcher>()|. 37 // Note: Use |MakeRefCounted<MockSimpleDispatcher>()|.
37 38
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 // Since we closed before joining, we can't say much about what each thread 587 // Since we closed before joining, we can't say much about what each thread
587 // saw as the state. 588 // saw as the state.
588 } 589 }
589 } 590 }
590 591
591 // TODO(vtl): Stress test? 592 // TODO(vtl): Stress test?
592 593
593 } // namespace 594 } // namespace
594 } // namespace system 595 } // namespace system
595 } // namespace mojo 596 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/simple_dispatcher.h ('k') | mojo/edk/system/slave_connection_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698