OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "base/command_line.h" | |
6 #include "base/message_loop/message_loop.h" | |
7 #include "base/test/launcher/unit_test_launcher.h" | |
8 #include "build/build_config.h" | |
9 #include "content/public/test/unittest_test_suite.h" | |
10 #include "content/test/content_test_suite.h" | |
11 | |
12 #if defined(OS_MACOSX) | |
13 #include "base/mac/scoped_nsautorelease_pool.h" | |
14 #endif | |
15 | |
16 namespace { | |
17 | |
18 int RunHelper(base::TestSuite* test_suite) { | |
19 content::UnitTestTestSuite runner(test_suite); | |
20 base::MessageLoopForIO message_loop; | |
21 return runner.Run(); | |
22 } | |
23 | |
24 } // namespace | |
25 | |
26 // These tests needs to run against a proper GL environment, so we | |
27 // need to set it up before we can run the tests. | |
28 int main(int argc, char** argv) { | |
29 base::CommandLine::Init(argc, argv); | |
30 base::TestSuite* suite = new content::ContentTestSuite(argc, argv); | |
31 #if defined(OS_MACOSX) | |
32 base::mac::ScopedNSAutoreleasePool pool; | |
33 #endif | |
34 | |
35 return base::LaunchUnitTestsSerially( | |
36 argc, | |
37 argv, | |
38 base::Bind(&RunHelper, base::Unretained(suite))); | |
39 } | |
OLD | NEW |