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/logging.h" | 9 #include "base/logging.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 } | 68 } |
69 virtual ~ContentBrowserTestSuite() { | 69 virtual ~ContentBrowserTestSuite() { |
70 } | 70 } |
71 | 71 |
72 protected: | 72 protected: |
73 virtual void Initialize() OVERRIDE { | 73 virtual void Initialize() OVERRIDE { |
74 | 74 |
75 #if defined(OS_ANDROID) | 75 #if defined(OS_ANDROID) |
76 // This needs to be done before base::TestSuite::Initialize() is called, | 76 // This needs to be done before base::TestSuite::Initialize() is called, |
77 // as it also tries to set MessagePumpForUIFactory. | 77 // as it also tries to set MessagePumpForUIFactory. |
78 if (!MessageLoop::InitMessagePumpForUIFactory(&CreateMessagePumpForUI)) | 78 if (!base::MessageLoop::InitMessagePumpForUIFactory( |
| 79 &CreateMessagePumpForUI)) |
79 LOG(INFO) << "MessagePumpForUIFactory already set, unable to override."; | 80 LOG(INFO) << "MessagePumpForUIFactory already set, unable to override."; |
80 #endif | 81 #endif |
81 | 82 |
82 ContentTestSuiteBase::Initialize(); | 83 ContentTestSuiteBase::Initialize(); |
83 | 84 |
84 testing::TestEventListeners& listeners = | 85 testing::TestEventListeners& listeners = |
85 testing::UnitTest::GetInstance()->listeners(); | 86 testing::UnitTest::GetInstance()->listeners(); |
86 listeners.Append(new ContentShellTestSuiteInitializer); | 87 listeners.Append(new ContentShellTestSuiteInitializer); |
87 } | 88 } |
88 virtual void Shutdown() OVERRIDE { | 89 virtual void Shutdown() OVERRIDE { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 private: | 126 private: |
126 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate); | 127 DISALLOW_COPY_AND_ASSIGN(ContentTestLauncherDelegate); |
127 }; | 128 }; |
128 | 129 |
129 } // namespace content | 130 } // namespace content |
130 | 131 |
131 int main(int argc, char** argv) { | 132 int main(int argc, char** argv) { |
132 content::ContentTestLauncherDelegate launcher_delegate; | 133 content::ContentTestLauncherDelegate launcher_delegate; |
133 return LaunchTests(&launcher_delegate, argc, argv); | 134 return LaunchTests(&launcher_delegate, argc, argv); |
134 } | 135 } |
OLD | NEW |