| 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 "chrome/test/base/mojo_test_connector.h" |    5 #include "chrome/test/base/mojo_test_connector.h" | 
|    6  |    6  | 
|    7 #include "base/bind.h" |    7 #include "base/bind.h" | 
|    8 #include "base/callback.h" |    8 #include "base/callback.h" | 
|    9 #include "base/command_line.h" |    9 #include "base/command_line.h" | 
|   10 #include "base/memory/ptr_util.h" |   10 #include "base/memory/ptr_util.h" | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
|   21 #include "services/catalog/store.h" |   21 #include "services/catalog/store.h" | 
|   22 #include "services/service_manager/native_runner_delegate.h" |   22 #include "services/service_manager/native_runner_delegate.h" | 
|   23 #include "services/service_manager/public/cpp/connector.h" |   23 #include "services/service_manager/public/cpp/connector.h" | 
|   24 #include "services/service_manager/public/cpp/service.h" |   24 #include "services/service_manager/public/cpp/service.h" | 
|   25 #include "services/service_manager/public/cpp/service_context.h" |   25 #include "services/service_manager/public/cpp/service_context.h" | 
|   26 #include "services/service_manager/runner/common/client_util.h" |   26 #include "services/service_manager/runner/common/client_util.h" | 
|   27 #include "services/service_manager/runner/common/switches.h" |   27 #include "services/service_manager/runner/common/switches.h" | 
|   28 #include "services/service_manager/service_manager.h" |   28 #include "services/service_manager/service_manager.h" | 
|   29 #include "services/service_manager/switches.h" |   29 #include "services/service_manager/switches.h" | 
|   30  |   30  | 
 |   31 using service_manager::mojom::Service; | 
 |   32 using service_manager::mojom::ServicePtr; | 
 |   33  | 
|   31 namespace { |   34 namespace { | 
|   32  |   35  | 
|   33 const char kTestRunnerName[] = "exe:mash_browser_tests"; |   36 const char kTestRunnerName[] = "exe:mash_browser_tests"; | 
|   34 const char kTestName[] = "service:content_browser"; |   37 const char kTestName[] = "service:content_browser"; | 
|   35  |   38  | 
|   36 // BackgroundTestState maintains all the state necessary to bind the test to |   39 // BackgroundTestState maintains all the state necessary to bind the test to | 
|   37 // mojo. This class is only used on the thread created by |   40 // mojo. This class is only used on the thread created by | 
|   38 // BackgroundServiceManager. |   41 // BackgroundServiceManager. | 
|   39 class BackgroundTestState { |   42 class BackgroundTestState { | 
|   40  public: |   43  public: | 
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  254 MojoTestConnector::~MojoTestConnector() {} |  257 MojoTestConnector::~MojoTestConnector() {} | 
|  255  |  258  | 
|  256 std::unique_ptr<content::TestState> MojoTestConnector::PrepareForTest( |  259 std::unique_ptr<content::TestState> MojoTestConnector::PrepareForTest( | 
|  257     base::CommandLine* command_line, |  260     base::CommandLine* command_line, | 
|  258     base::TestLauncher::LaunchOptions* test_launch_options) { |  261     base::TestLauncher::LaunchOptions* test_launch_options) { | 
|  259   std::unique_ptr<MojoTestState> test_state( |  262   std::unique_ptr<MojoTestState> test_state( | 
|  260       new MojoTestState(&background_service_manager_)); |  263       new MojoTestState(&background_service_manager_)); | 
|  261   test_state->Init(command_line, test_launch_options); |  264   test_state->Init(command_line, test_launch_options); | 
|  262   return std::move(test_state); |  265   return std::move(test_state); | 
|  263 } |  266 } | 
| OLD | NEW |