1 // Copyright 2014 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/bind.h" 6 #include "base/message_loop/message_pump_type.h" 7 #include "base/test/launcher/unit_test_launcher.h" 8 #include "base/test/test_suite.h" 9 #include "base/threading/thread.h" 10 #include "mojo/core/embedder/embedder.h" 11 #include "mojo/core/embedder/scoped_ipc_support.h" 12 main(int argc,char ** argv)13int main(int argc, char** argv) { 14 base::TestSuite test_suite(argc, argv); 15 16 base::Thread ipc_thread("IPC thread"); 17 ipc_thread.StartWithOptions( 18 base::Thread::Options(base::MessagePumpType::IO, 0)); 19 20 mojo::core::Init(); 21 mojo::core::ScopedIPCSupport ipc_support( 22 ipc_thread.task_runner(), 23 mojo::core::ScopedIPCSupport::ShutdownPolicy::CLEAN); 24 25 return base::LaunchUnitTests( 26 argc, argv, 27 base::BindOnce(&base::TestSuite::Run, base::Unretained(&test_suite))); 28 } 29