| 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" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 168 |
| 169 // CoreTestBase ---------------------------------------------------------------- | 169 // CoreTestBase ---------------------------------------------------------------- |
| 170 | 170 |
| 171 CoreTestBase::CoreTestBase() { | 171 CoreTestBase::CoreTestBase() { |
| 172 } | 172 } |
| 173 | 173 |
| 174 CoreTestBase::~CoreTestBase() { | 174 CoreTestBase::~CoreTestBase() { |
| 175 } | 175 } |
| 176 | 176 |
| 177 void CoreTestBase::SetUp() { | 177 void CoreTestBase::SetUp() { |
| 178 core_ = new Core(make_scoped_ptr(new embedder::SimplePlatformSupport())); | 178 core_ = new Core(scoped_ptr<embedder::PlatformSupport>( |
| 179 new embedder::SimplePlatformSupport())); |
| 179 } | 180 } |
| 180 | 181 |
| 181 void CoreTestBase::TearDown() { | 182 void CoreTestBase::TearDown() { |
| 182 delete core_; | 183 delete core_; |
| 183 core_ = nullptr; | 184 core_ = nullptr; |
| 184 } | 185 } |
| 185 | 186 |
| 186 MojoHandle CoreTestBase::CreateMockHandle(CoreTestBase::MockHandleInfo* info) { | 187 MojoHandle CoreTestBase::CreateMockHandle(CoreTestBase::MockHandleInfo* info) { |
| 187 CHECK(core_); | 188 CHECK(core_); |
| 188 scoped_refptr<MockDispatcher> dispatcher(new MockDispatcher(info)); | 189 scoped_refptr<MockDispatcher> dispatcher(new MockDispatcher(info)); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 } | 348 } |
| 348 | 349 |
| 349 void CoreTestBase_MockHandleInfo::IncrementCancelAllWaitersCallCount() { | 350 void CoreTestBase_MockHandleInfo::IncrementCancelAllWaitersCallCount() { |
| 350 base::AutoLock locker(lock_); | 351 base::AutoLock locker(lock_); |
| 351 cancel_all_waiters_call_count_++; | 352 cancel_all_waiters_call_count_++; |
| 352 } | 353 } |
| 353 | 354 |
| 354 } // namespace test | 355 } // namespace test |
| 355 } // namespace system | 356 } // namespace system |
| 356 } // namespace mojo | 357 } // namespace mojo |
| OLD | NEW |