| 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/edk/system/core_test_base.h" | 5 #include "mojo/edk/system/core_test_base.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 177 |
| 178 CoreTestBase::~CoreTestBase() { | 178 CoreTestBase::~CoreTestBase() { |
| 179 } | 179 } |
| 180 | 180 |
| 181 MojoHandle CoreTestBase::CreateMockHandle(CoreTestBase::MockHandleInfo* info) { | 181 MojoHandle CoreTestBase::CreateMockHandle(CoreTestBase::MockHandleInfo* info) { |
| 182 scoped_refptr<MockDispatcher> dispatcher = MockDispatcher::Create(info); | 182 scoped_refptr<MockDispatcher> dispatcher = MockDispatcher::Create(info); |
| 183 return core()->AddDispatcher(dispatcher); | 183 return core()->AddDispatcher(dispatcher); |
| 184 } | 184 } |
| 185 | 185 |
| 186 Core* CoreTestBase::core() { | 186 Core* CoreTestBase::core() { |
| 187 return mojo::edk::internal::GetCore(); | 187 return mojo::edk::internal::g_core; |
| 188 } | 188 } |
| 189 | 189 |
| 190 // CoreTestBase_MockHandleInfo ------------------------------------------------- | 190 // CoreTestBase_MockHandleInfo ------------------------------------------------- |
| 191 | 191 |
| 192 CoreTestBase_MockHandleInfo::CoreTestBase_MockHandleInfo() | 192 CoreTestBase_MockHandleInfo::CoreTestBase_MockHandleInfo() |
| 193 : ctor_call_count_(0), | 193 : ctor_call_count_(0), |
| 194 dtor_call_count_(0), | 194 dtor_call_count_(0), |
| 195 close_call_count_(0), | 195 close_call_count_(0), |
| 196 write_message_call_count_(0), | 196 write_message_call_count_(0), |
| 197 read_message_call_count_(0), | 197 read_message_call_count_(0), |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 } | 371 } |
| 372 | 372 |
| 373 void CoreTestBase_MockHandleInfo::AwakableWasAdded(Awakable* awakable) { | 373 void CoreTestBase_MockHandleInfo::AwakableWasAdded(Awakable* awakable) { |
| 374 base::AutoLock locker(lock_); | 374 base::AutoLock locker(lock_); |
| 375 added_awakables_.push_back(awakable); | 375 added_awakables_.push_back(awakable); |
| 376 } | 376 } |
| 377 | 377 |
| 378 } // namespace test | 378 } // namespace test |
| 379 } // namespace edk | 379 } // namespace edk |
| 380 } // namespace mojo | 380 } // namespace mojo |
| OLD | NEW |