blob: 1c2199058ba6bdcb15a9a8287e711eff009924d5 [file] [log] [blame]
[email protected]5b91fc52013-11-19 01:00:471// 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
sergiyb2d09edb2014-12-02 19:10:045#include "base/bind.h"
[email protected]5b91fc52013-11-19 01:00:476#include "base/command_line.h"
Chris Sharp7840c582019-08-02 15:45:327#include "base/message_loop/message_pump_type.h"
Carlos Caballeroa1f7a0d2019-06-12 08:20:348#include "base/task/single_thread_task_executor.h"
sergiyb2d09edb2014-12-02 19:10:049#include "base/test/launcher/unit_test_launcher.h"
10#include "base/test/test_suite.h"
[email protected]5b91fc52013-11-19 01:00:4711#include "testing/gmock/include/gmock/gmock.h"
[email protected]6a502252013-12-13 11:49:0912#include "third_party/angle/include/GLSLANG/ShaderLang.h"
[email protected]5b91fc52013-11-19 01:00:4713
sergiyb2d09edb2014-12-02 19:10:0414namespace {
15
16int RunHelper(base::TestSuite* test_suite) {
Chris Sharp7840c582019-08-02 15:45:3217 base::SingleThreadTaskExecutor io_task_executor(base::MessagePumpType::IO);
sergiyb2d09edb2014-12-02 19:10:0418 return test_suite->Run();
19}
20
21} // namespace
22
[email protected]5b91fc52013-11-19 01:00:4723int main(int argc, char** argv) {
avi9ab037202014-12-22 23:49:5324 base::CommandLine::Init(argc, argv);
[email protected]5b91fc52013-11-19 01:00:4725 testing::InitGoogleMock(&argc, argv);
jmadilld16b2102017-01-03 18:32:4226 sh::Initialize();
François Doray2b82f402019-11-04 21:16:4827
sergiyb2d09edb2014-12-02 19:10:0428 base::TestSuite test_suite(argc, argv);
François Doray2b82f402019-11-04 21:16:4829 test_suite.DisableCheckForThreadAndProcessPriority();
30
sergiyb2d09edb2014-12-02 19:10:0431 int rt = base::LaunchUnitTestsSerially(
Corentin Wallez0b71452b2018-10-30 17:35:0032 argc, argv, base::BindOnce(&RunHelper, base::Unretained(&test_suite)));
jmadilld16b2102017-01-03 18:32:4233 sh::Finalize();
[email protected]5b91fc52013-11-19 01:00:4734 return rt;
35}