OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/test/launcher/unit_test_launcher.h" | 9 #include "base/test/launcher/unit_test_launcher.h" |
10 #include "base/test/test_suite.h" | 10 #include "base/test/test_suite.h" |
| 11 #include "gpu/angle_test_batcher.h" |
11 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "third_party/angle/include/GLSLANG/ShaderLang.h" | 14 #include "third_party/angle/include/GLSLANG/ShaderLang.h" |
14 | 15 |
15 namespace { | 16 namespace { |
16 | 17 |
17 int RunHelper(base::TestSuite* test_suite) { | 18 int RunHelper(base::TestSuite* test_suite) { |
18 base::MessageLoopForIO message_loop; | 19 base::MessageLoopForIO message_loop; |
19 return test_suite->Run(); | 20 return test_suite->Run(); |
20 } | 21 } |
21 | 22 |
22 } // namespace | 23 } // namespace |
23 | 24 |
24 int main(int argc, char** argv) { | 25 int main(int argc, char** argv) { |
25 base::CommandLine::Init(argc, argv); | 26 base::CommandLine::Init(argc, argv); |
| 27 gpu::BatchANGLETests(); |
26 testing::InitGoogleMock(&argc, argv); | 28 testing::InitGoogleMock(&argc, argv); |
27 ShInitialize(); | 29 ShInitialize(); |
28 base::TestSuite test_suite(argc, argv); | 30 base::TestSuite test_suite(argc, argv); |
29 int rt = base::LaunchUnitTestsSerially( | 31 int rt = base::LaunchUnitTestsSerially( |
30 argc, | 32 argc, |
31 argv, | 33 argv, |
32 base::Bind(&RunHelper, base::Unretained(&test_suite))); | 34 base::Bind(&RunHelper, base::Unretained(&test_suite))); |
33 ShFinalize(); | 35 ShFinalize(); |
34 return rt; | 36 return rt; |
35 } | 37 } |
OLD | NEW |