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/i18n/icu_util.h" | 10 #include "base/i18n/icu_util.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "content/public/common/content_paths.h" | 33 #include "content/public/common/content_paths.h" |
34 #include "content/public/test/nested_message_pump_android.h" | 34 #include "content/public/test/nested_message_pump_android.h" |
35 #include "content/shell/browser/shell_content_browser_client.h" | 35 #include "content/shell/browser/shell_content_browser_client.h" |
36 #include "content/shell/common/shell_content_client.h" | 36 #include "content/shell/common/shell_content_client.h" |
37 #include "ui/base/ui_base_paths.h" | 37 #include "ui/base/ui_base_paths.h" |
38 #endif | 38 #endif |
39 | 39 |
40 namespace content { | 40 namespace content { |
41 | 41 |
42 #if defined(OS_ANDROID) | 42 #if defined(OS_ANDROID) |
43 scoped_ptr<base::MessagePump> CreateMessagePumpForUI() { | 43 std::unique_ptr<base::MessagePump> CreateMessagePumpForUI() { |
44 return scoped_ptr<base::MessagePump>(new NestedMessagePumpAndroid()); | 44 return std::unique_ptr<base::MessagePump>(new NestedMessagePumpAndroid()); |
45 }; | 45 }; |
46 #endif | 46 #endif |
47 | 47 |
48 class ContentBrowserTestSuite : public ContentTestSuiteBase { | 48 class ContentBrowserTestSuite : public ContentTestSuiteBase { |
49 public: | 49 public: |
50 ContentBrowserTestSuite(int argc, char** argv) | 50 ContentBrowserTestSuite(int argc, char** argv) |
51 : ContentTestSuiteBase(argc, argv) { | 51 : ContentTestSuiteBase(argc, argv) { |
52 } | 52 } |
53 ~ContentBrowserTestSuite() override {} | 53 ~ContentBrowserTestSuite() override {} |
54 | 54 |
(...skipping 27 matching lines...) Expand all Loading... |
82 ui::RegisterPathProvider(); | 82 ui::RegisterPathProvider(); |
83 RegisterInProcessThreads(); | 83 RegisterInProcessThreads(); |
84 | 84 |
85 InitializeMojo(); | 85 InitializeMojo(); |
86 #endif | 86 #endif |
87 | 87 |
88 ContentTestSuiteBase::Initialize(); | 88 ContentTestSuiteBase::Initialize(); |
89 } | 89 } |
90 | 90 |
91 #if defined(OS_ANDROID) | 91 #if defined(OS_ANDROID) |
92 scoped_ptr<ShellContentClient> content_client_; | 92 std::unique_ptr<ShellContentClient> content_client_; |
93 scoped_ptr<ShellContentBrowserClient> browser_content_client_; | 93 std::unique_ptr<ShellContentBrowserClient> browser_content_client_; |
94 #endif | 94 #endif |
95 | 95 |
96 DISALLOW_COPY_AND_ASSIGN(ContentBrowserTestSuite); | 96 DISALLOW_COPY_AND_ASSIGN(ContentBrowserTestSuite); |
97 }; | 97 }; |
98 | 98 |
99 class ContentTestLauncherDelegate : public TestLauncherDelegate { | 99 class ContentTestLauncherDelegate : public TestLauncherDelegate { |
100 public: | 100 public: |
101 ContentTestLauncherDelegate() {} | 101 ContentTestLauncherDelegate() {} |
102 ~ContentTestLauncherDelegate() override {} | 102 ~ContentTestLauncherDelegate() override {} |
103 | 103 |
(...skipping 19 matching lines...) Expand all Loading... |
123 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate); | 123 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate); |
124 }; | 124 }; |
125 | 125 |
126 } // namespace content | 126 } // namespace content |
127 | 127 |
128 int main(int argc, char** argv) { | 128 int main(int argc, char** argv) { |
129 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2); | 129 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2); |
130 content::ContentTestLauncherDelegate launcher_delegate; | 130 content::ContentTestLauncherDelegate launcher_delegate; |
131 return LaunchTests(&launcher_delegate, default_jobs, argc, argv); | 131 return LaunchTests(&launcher_delegate, default_jobs, argc, argv); |
132 } | 132 } |
OLD | NEW |