[email protected] | 5b91fc5 | 2013-11-19 01:00:47 | [diff] [blame] | 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 | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
sergiyb | 2d09edb | 2014-12-02 19:10:04 | [diff] [blame] | 5 | #include "base/bind.h" |
[email protected] | 5b91fc5 | 2013-11-19 01:00:47 | [diff] [blame] | 6 | #include "base/command_line.h" |
Chris Sharp | 7840c58 | 2019-08-02 15:45:32 | [diff] [blame] | 7 | #include "base/message_loop/message_pump_type.h" |
Carlos Caballero | a1f7a0d | 2019-06-12 08:20:34 | [diff] [blame] | 8 | #include "base/task/single_thread_task_executor.h" |
sergiyb | 2d09edb | 2014-12-02 19:10:04 | [diff] [blame] | 9 | #include "base/test/launcher/unit_test_launcher.h" |
10 | #include "base/test/test_suite.h" | ||||
[email protected] | 5b91fc5 | 2013-11-19 01:00:47 | [diff] [blame] | 11 | #include "testing/gmock/include/gmock/gmock.h" |
[email protected] | 6a50225 | 2013-12-13 11:49:09 | [diff] [blame] | 12 | #include "third_party/angle/include/GLSLANG/ShaderLang.h" |
[email protected] | 5b91fc5 | 2013-11-19 01:00:47 | [diff] [blame] | 13 | |
sergiyb | 2d09edb | 2014-12-02 19:10:04 | [diff] [blame] | 14 | namespace { |
15 | |||||
16 | int RunHelper(base::TestSuite* test_suite) { | ||||
Chris Sharp | 7840c58 | 2019-08-02 15:45:32 | [diff] [blame] | 17 | base::SingleThreadTaskExecutor io_task_executor(base::MessagePumpType::IO); |
sergiyb | 2d09edb | 2014-12-02 19:10:04 | [diff] [blame] | 18 | return test_suite->Run(); |
19 | } | ||||
20 | |||||
21 | } // namespace | ||||
22 | |||||
[email protected] | 5b91fc5 | 2013-11-19 01:00:47 | [diff] [blame] | 23 | int main(int argc, char** argv) { |
avi | 9ab03720 | 2014-12-22 23:49:53 | [diff] [blame] | 24 | base::CommandLine::Init(argc, argv); |
[email protected] | 5b91fc5 | 2013-11-19 01:00:47 | [diff] [blame] | 25 | testing::InitGoogleMock(&argc, argv); |
jmadill | d16b210 | 2017-01-03 18:32:42 | [diff] [blame] | 26 | sh::Initialize(); |
François Doray | 2b82f40 | 2019-11-04 21:16:48 | [diff] [blame] | 27 | |
sergiyb | 2d09edb | 2014-12-02 19:10:04 | [diff] [blame] | 28 | base::TestSuite test_suite(argc, argv); |
François Doray | 2b82f40 | 2019-11-04 21:16:48 | [diff] [blame] | 29 | test_suite.DisableCheckForThreadAndProcessPriority(); |
30 | |||||
sergiyb | 2d09edb | 2014-12-02 19:10:04 | [diff] [blame] | 31 | int rt = base::LaunchUnitTestsSerially( |
Corentin Wallez | 0b71452b | 2018-10-30 17:35:00 | [diff] [blame] | 32 | argc, argv, base::BindOnce(&RunHelper, base::Unretained(&test_suite))); |
jmadill | d16b210 | 2017-01-03 18:32:42 | [diff] [blame] | 33 | sh::Finalize(); |
[email protected] | 5b91fc5 | 2013-11-19 01:00:47 | [diff] [blame] | 34 | return rt; |
35 | } |