OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/test/launcher/unit_test_launcher.h" | 8 #include "base/test/launcher/unit_test_launcher.h" |
9 #include "base/test/test_suite.h" | 9 #include "base/test/test_suite.h" |
10 #include "mojo/shell/context.h" | 10 #include "mojo/system/core_impl.h" |
11 | |
12 class ShellTestSuite : public base::TestSuite { | |
13 public: | |
14 ShellTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} | |
15 | |
16 private: | |
17 base::MessageLoop message_loop_; | |
18 // Context is currently a singleton and requires a MessageLoop. | |
19 mojo::shell::Context context_; | |
20 | |
21 DISALLOW_COPY_AND_ASSIGN(ShellTestSuite); | |
22 }; | |
23 | 11 |
24 int main(int argc, char** argv) { | 12 int main(int argc, char** argv) { |
25 ShellTestSuite test_suite(argc, argv); | 13 base::TestSuite test_suite(argc, argv); |
| 14 |
| 15 mojo::system::CoreImpl::Init(); |
26 | 16 |
27 return base::LaunchUnitTests( | 17 return base::LaunchUnitTests( |
28 argc, argv, base::Bind(&ShellTestSuite::Run, | 18 argc, argv, base::Bind(&base::TestSuite::Run, |
29 base::Unretained(&test_suite))); | 19 base::Unretained(&test_suite))); |
30 } | 20 } |
OLD | NEW |