| 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/background/background_service_manager.h" | 5 #include "services/service_manager/background/background_service_manager.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| 11 #include "base/values.h" |
| 11 #include "services/service_manager/background/tests/test.mojom.h" | 12 #include "services/service_manager/background/tests/test.mojom.h" |
| 12 #include "services/service_manager/public/cpp/connector.h" | 13 #include "services/service_manager/public/cpp/connector.h" |
| 13 #include "services/service_manager/public/cpp/service.h" | 14 #include "services/service_manager/public/cpp/service.h" |
| 14 #include "services/service_manager/public/cpp/service_context.h" | 15 #include "services/service_manager/public/cpp/service_context.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 17 |
| 17 namespace service_manager { | 18 namespace service_manager { |
| 18 namespace { | 19 namespace { |
| 19 | 20 |
| 20 const char kTestName[] = "background_service_manager_unittest"; | 21 const char kTestName[] = "background_service_manager_unittest"; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 service_context.connector()->BindInterface(kAppName, &test_service); | 66 service_context.connector()->BindInterface(kAppName, &test_service); |
| 66 base::RunLoop run_loop; | 67 base::RunLoop run_loop; |
| 67 bool got_result = false; | 68 bool got_result = false; |
| 68 test_service->Test( | 69 test_service->Test( |
| 69 base::Bind(&SetFlagAndRunClosure, &got_result, run_loop.QuitClosure())); | 70 base::Bind(&SetFlagAndRunClosure, &got_result, run_loop.QuitClosure())); |
| 70 run_loop.Run(); | 71 run_loop.Run(); |
| 71 EXPECT_TRUE(got_result); | 72 EXPECT_TRUE(got_result); |
| 72 } | 73 } |
| 73 | 74 |
| 74 } // namespace service_manager | 75 } // namespace service_manager |
| OLD | NEW |