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