1 // Copyright 2018 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/command_line.h"
6 #include "base/functional/bind.h"
7 #include "base/message_loop/message_pump_type.h"
8 #include "base/task/single_thread_task_executor.h"
9 #include "base/test/launcher/unit_test_launcher.h"
10 #include "base/test/test_suite.h"
11 #include "testing/gmock/include/gmock/gmock.h"
15 int RunHelper(base::TestSuite* test_suite) {
16 base::SingleThreadTaskExecutor io_task_executor(base::MessagePumpType::IO);
17 return test_suite->Run();
22 // Definition located in third_party/dawn/src/tests/unittests/validation/ValidationTest.h
23 // Forward declared here to avoid pulling in the Dawn headers.
24 void InitDawnValidationTestEnvironment(int argc, char** argv);
26 int main(int argc, char** argv) {
27 base::CommandLine::Init(argc, argv);
28 InitDawnValidationTestEnvironment(argc, argv);
29 testing::InitGoogleMock(&argc, argv);
30 base::TestSuite test_suite(argc, argv);
31 int rt = base::LaunchUnitTestsSerially(
32 argc, argv, base::BindOnce(&RunHelper, base::Unretained(&test_suite)));