| 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 <algorithm> |    5 #include <algorithm> | 
|    6  |    6  | 
|    7 #include "base/at_exit.h" |    7 #include "base/at_exit.h" | 
|    8 #include "base/command_line.h" |    8 #include "base/command_line.h" | 
|    9 #include "base/debug/debugger.h" |    9 #include "base/debug/debugger.h" | 
|   10 #include "base/process/launch.h" |   10 #include "base/process/launch.h" | 
|   11 #include "base/sys_info.h" |   11 #include "base/sys_info.h" | 
|   12 #include "chrome/test/base/chrome_test_launcher.h" |   12 #include "chrome/test/base/chrome_test_launcher.h" | 
|   13 #include "chrome/test/base/chrome_test_suite.h" |   13 #include "chrome/test/base/chrome_test_suite.h" | 
|   14 #include "chrome/test/base/mojo_test_connector.h" |   14 #include "chrome/test/base/mojo_test_connector.h" | 
|   15 #include "content/public/common/mojo_shell_connection.h" |   15 #include "content/public/common/mojo_shell_connection.h" | 
|   16 #include "content/public/test/test_launcher.h" |   16 #include "content/public/test/test_launcher.h" | 
|   17 #include "mojo/shell/public/cpp/connector.h" |   17 #include "services/shell/public/cpp/connector.h" | 
|   18 #include "mojo/shell/public/cpp/shell_client.h" |   18 #include "services/shell/public/cpp/shell_client.h" | 
|   19 #include "mojo/shell/public/cpp/shell_connection.h" |   19 #include "services/shell/public/cpp/shell_connection.h" | 
|   20 #include "mojo/shell/runner/common/switches.h" |   20 #include "services/shell/runner/common/switches.h" | 
|   21 #include "mojo/shell/runner/host/child_process.h" |   21 #include "services/shell/runner/host/child_process.h" | 
|   22 #include "mojo/shell/runner/init.h" |   22 #include "services/shell/runner/init.h" | 
|   23  |   23  | 
|   24 namespace { |   24 namespace { | 
|   25  |   25  | 
|   26 void ConnectToDefaultApps(mojo::Connector* connector) { |   26 void ConnectToDefaultApps(mojo::Connector* connector) { | 
|   27   connector->Connect("mojo:mash_session"); |   27   connector->Connect("mojo:mash_session"); | 
|   28 } |   28 } | 
|   29  |   29  | 
|   30 class MashTestSuite : public ChromeTestSuite { |   30 class MashTestSuite : public ChromeTestSuite { | 
|   31  public: |   31  public: | 
|   32   MashTestSuite(int argc, char** argv) : ChromeTestSuite(argc, argv) {} |   32   MashTestSuite(int argc, char** argv) : ChromeTestSuite(argc, argv) {} | 
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  140   content::MojoShellConnection::Factory shell_connection_factory; |  140   content::MojoShellConnection::Factory shell_connection_factory; | 
|  141   if (command_line.HasSwitch(content::kSingleProcessTestsFlag) && |  141   if (command_line.HasSwitch(content::kSingleProcessTestsFlag) && | 
|  142       !command_line.HasSwitch(switches::kPrimordialPipeToken)) { |  142       !command_line.HasSwitch(switches::kPrimordialPipeToken)) { | 
|  143     shell_connection_factory = |  143     shell_connection_factory = | 
|  144         base::Bind(&CreateMojoShellConnection, &delegate); |  144         base::Bind(&CreateMojoShellConnection, &delegate); | 
|  145     content::MojoShellConnection::SetFactoryForTest(&shell_connection_factory); |  145     content::MojoShellConnection::SetFactoryForTest(&shell_connection_factory); | 
|  146   } |  146   } | 
|  147   *exit_code = LaunchChromeTests(default_jobs, &delegate, argc, argv); |  147   *exit_code = LaunchChromeTests(default_jobs, &delegate, argc, argv); | 
|  148   return true; |  148   return true; | 
|  149 } |  149 } | 
| OLD | NEW |