OLD | NEW |
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/system/core_test_base.h" | 5 #include "mojo/system/core_test_base.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "mojo/system/constants.h" | 12 #include "mojo/system/constants.h" |
13 #include "mojo/system/core_impl.h" | 13 #include "mojo/system/core.h" |
14 #include "mojo/system/dispatcher.h" | 14 #include "mojo/system/dispatcher.h" |
15 #include "mojo/system/memory.h" | 15 #include "mojo/system/memory.h" |
16 | 16 |
17 namespace mojo { | 17 namespace mojo { |
18 namespace system { | 18 namespace system { |
19 namespace test { | 19 namespace test { |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 // MockDispatcher -------------------------------------------------------------- | 23 // MockDispatcher -------------------------------------------------------------- |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 // CoreTestBase ---------------------------------------------------------------- | 162 // CoreTestBase ---------------------------------------------------------------- |
163 | 163 |
164 CoreTestBase::CoreTestBase() { | 164 CoreTestBase::CoreTestBase() { |
165 } | 165 } |
166 | 166 |
167 CoreTestBase::~CoreTestBase() { | 167 CoreTestBase::~CoreTestBase() { |
168 } | 168 } |
169 | 169 |
170 void CoreTestBase::SetUp() { | 170 void CoreTestBase::SetUp() { |
171 core_ = new CoreImpl(); | 171 core_ = new Core(); |
172 } | 172 } |
173 | 173 |
174 void CoreTestBase::TearDown() { | 174 void CoreTestBase::TearDown() { |
175 delete core_; | 175 delete core_; |
176 core_ = NULL; | 176 core_ = NULL; |
177 } | 177 } |
178 | 178 |
179 MojoHandle CoreTestBase::CreateMockHandle(CoreTestBase::MockHandleInfo* info) { | 179 MojoHandle CoreTestBase::CreateMockHandle(CoreTestBase::MockHandleInfo* info) { |
180 CHECK(core_); | 180 CHECK(core_); |
181 scoped_refptr<MockDispatcher> dispatcher(new MockDispatcher(info)); | 181 scoped_refptr<MockDispatcher> dispatcher(new MockDispatcher(info)); |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 } | 340 } |
341 | 341 |
342 void CoreTestBase_MockHandleInfo::IncrementCancelAllWaitersCallCount() { | 342 void CoreTestBase_MockHandleInfo::IncrementCancelAllWaitersCallCount() { |
343 base::AutoLock locker(lock_); | 343 base::AutoLock locker(lock_); |
344 cancel_all_waiters_call_count_++; | 344 cancel_all_waiters_call_count_++; |
345 } | 345 } |
346 | 346 |
347 } // namespace test | 347 } // namespace test |
348 } // namespace system | 348 } // namespace system |
349 } // namespace mojo | 349 } // namespace mojo |
OLD | NEW |