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 "base/macros.h" | 5 #include "base/macros.h" |
6 #include "base/sys_info.h" | 6 #include "base/sys_info.h" |
7 #include "base/test/test_suite.h" | 7 #include "base/test/test_suite.h" |
8 #include "chromecast/app/cast_main_delegate.h" | 8 #include "chromecast/app/cast_main_delegate.h" |
| 9 #include "chromecast/base/cast_paths.h" |
9 #include "content/public/test/test_launcher.h" | 10 #include "content/public/test/test_launcher.h" |
| 11 #include "ipc/ipc_channel.h" |
| 12 #include "mojo/edk/embedder/embedder.h" |
10 | 13 |
11 namespace chromecast { | 14 namespace chromecast { |
12 namespace shell { | 15 namespace shell { |
13 | 16 |
14 class CastTestLauncherDelegate : public content::TestLauncherDelegate { | 17 class CastTestLauncherDelegate : public content::TestLauncherDelegate { |
15 public: | 18 public: |
16 CastTestLauncherDelegate() {} | 19 CastTestLauncherDelegate() {} |
17 ~CastTestLauncherDelegate() override {} | 20 ~CastTestLauncherDelegate() override {} |
18 | 21 |
19 int RunTestSuite(int argc, char** argv) override { | 22 int RunTestSuite(int argc, char** argv) override { |
(...skipping 14 matching lines...) Expand all Loading... |
34 private: | 37 private: |
35 DISALLOW_COPY_AND_ASSIGN(CastTestLauncherDelegate); | 38 DISALLOW_COPY_AND_ASSIGN(CastTestLauncherDelegate); |
36 }; | 39 }; |
37 | 40 |
38 } // namespace shell | 41 } // namespace shell |
39 } // namespace chromecast | 42 } // namespace chromecast |
40 | 43 |
41 int main(int argc, char** argv) { | 44 int main(int argc, char** argv) { |
42 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2); | 45 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2); |
43 chromecast::shell::CastTestLauncherDelegate launcher_delegate; | 46 chromecast::shell::CastTestLauncherDelegate launcher_delegate; |
| 47 chromecast::RegisterPathProvider(); |
| 48 mojo::edk::SetMaxMessageSize(IPC::Channel::kMaximumMessageSize); |
| 49 mojo::edk::Init(); |
44 return content::LaunchTests(&launcher_delegate, default_jobs, argc, argv); | 50 return content::LaunchTests(&launcher_delegate, default_jobs, argc, argv); |
45 } | 51 } |
OLD | NEW |