OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/service_manager/public/cpp/service_test.h" | 5 #include "services/service_manager/public/cpp/service_test.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 context_ = base::MakeUnique<ServiceContext>(CreateService(), | 82 context_ = base::MakeUnique<ServiceContext>(CreateService(), |
83 mojom::ServiceRequest(&service)); | 83 mojom::ServiceRequest(&service)); |
84 background_service_manager_->RegisterService( | 84 background_service_manager_->RegisterService( |
85 Identity(test_name_, mojom::kRootUserID), std::move(service), nullptr); | 85 Identity(test_name_, mojom::kRootUserID), std::move(service), nullptr); |
86 connector_ = context_->connector(); | 86 connector_ = context_->connector(); |
87 run_loop.Run(); | 87 run_loop.Run(); |
88 } | 88 } |
89 | 89 |
90 void ServiceTest::TearDown() { | 90 void ServiceTest::TearDown() { |
91 background_service_manager_.reset(); | 91 background_service_manager_.reset(); |
| 92 context_.reset(); |
92 message_loop_.reset(); | 93 message_loop_.reset(); |
93 context_.reset(); | |
94 } | 94 } |
95 | 95 |
96 } // namespace test | 96 } // namespace test |
97 } // namespace service_manager | 97 } // namespace service_manager |
OLD | NEW |