OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/public/test/test_launcher.h" | 5 #include "content/public/test/test_launcher.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/stack_trace.h" | 9 #include "base/debug/stack_trace.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 RegisterPathProvider(); | 69 RegisterPathProvider(); |
70 ui::RegisterPathProvider(); | 70 ui::RegisterPathProvider(); |
71 RegisterInProcessThreads(); | 71 RegisterInProcessThreads(); |
72 | 72 |
73 InitializeMojo(); | 73 InitializeMojo(); |
74 #endif | 74 #endif |
75 | 75 |
76 ContentTestSuiteBase::Initialize(); | 76 ContentTestSuiteBase::Initialize(); |
77 } | 77 } |
78 | 78 |
| 79 virtual void Shutdown() OVERRIDE { |
| 80 ContentTestSuiteBase::Shutdown(); |
| 81 |
| 82 #if defined(OS_ANDROID) |
| 83 ShutdownMojo(); |
| 84 #endif |
| 85 } |
| 86 |
79 #if defined(OS_ANDROID) | 87 #if defined(OS_ANDROID) |
80 scoped_ptr<ShellContentClient> content_client_; | 88 scoped_ptr<ShellContentClient> content_client_; |
81 scoped_ptr<ShellContentBrowserClient> browser_content_client_; | 89 scoped_ptr<ShellContentBrowserClient> browser_content_client_; |
82 #endif | 90 #endif |
83 | 91 |
84 DISALLOW_COPY_AND_ASSIGN(ContentBrowserTestSuite); | 92 DISALLOW_COPY_AND_ASSIGN(ContentBrowserTestSuite); |
85 }; | 93 }; |
86 | 94 |
87 class ContentTestLauncherDelegate : public TestLauncherDelegate { | 95 class ContentTestLauncherDelegate : public TestLauncherDelegate { |
88 public: | 96 public: |
(...skipping 22 matching lines...) Expand all Loading... |
111 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate); | 119 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate); |
112 }; | 120 }; |
113 | 121 |
114 } // namespace content | 122 } // namespace content |
115 | 123 |
116 int main(int argc, char** argv) { | 124 int main(int argc, char** argv) { |
117 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2); | 125 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2); |
118 content::ContentTestLauncherDelegate launcher_delegate; | 126 content::ContentTestLauncherDelegate launcher_delegate; |
119 return LaunchTests(&launcher_delegate, default_jobs, argc, argv); | 127 return LaunchTests(&launcher_delegate, default_jobs, argc, argv); |
120 } | 128 } |
OLD | NEW |