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