Chromium Code Reviews| Index: third_party/WebKit/Source/platform/testing/RunAllTests.cpp |
| diff --git a/third_party/WebKit/Source/platform/testing/RunAllTests.cpp b/third_party/WebKit/Source/platform/testing/RunAllTests.cpp |
| index 605fbef0ac1e944b1c9f3397ffa0dd1d9103e40f..c42c31285bf56aecd397858d5733ade05f27676f 100644 |
| --- a/third_party/WebKit/Source/platform/testing/RunAllTests.cpp |
| +++ b/third_party/WebKit/Source/platform/testing/RunAllTests.cpp |
| @@ -28,6 +28,10 @@ |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| +#include "base/command_line.h" |
|
esprehn
2016/02/18 06:48:13
Why?
Yuki
2016/02/18 13:33:44
I overlooked
#include <base/command_line.h>
belo
|
| +#include "base/test/test_io_thread.h" |
| +#include "mojo/edk/embedder/embedder.h" |
| +#include "mojo/edk/test/scoped_ipc_support.h" |
| #include "platform/EventTracer.h" |
| #include "platform/HTTPNames.h" |
| #include "platform/heap/Heap.h" |
| @@ -43,20 +47,23 @@ |
| #include <base/test/launcher/unit_test_launcher.h> |
| #include <base/test/test_suite.h> |
| #include <cc/blink/web_compositor_support_impl.h> |
| -#include <string.h> |
| -static double dummyCurrentTime() |
| +namespace { |
| + |
| +double dummyCurrentTime() |
| { |
| return 0.0; |
| } |
| -static int runTestSuite(base::TestSuite* testSuite) |
| +int runTestSuite(base::TestSuite* testSuite) |
| { |
| int result = testSuite->Run(); |
| blink::Heap::collectAllGarbage(); |
| return result; |
| } |
| +} // namespace |
| + |
| int main(int argc, char** argv) |
| { |
| base::CommandLine::Init(argc, argv); |
| @@ -79,6 +86,12 @@ int main(int argc, char** argv) |
| blink::HTTPNames::init(); |
| base::TestSuite testSuite(argc, argv); |
| + |
| + mojo::edk::Init(); |
| + base::TestIOThread testIoThread(base::TestIOThread::kAutoStart); |
| + WTF::OwnPtr<mojo::edk::test::ScopedIPCSupport> ipcSupport( |
| + adoptPtr(new mojo::edk::test::ScopedIPCSupport(testIoThread.task_runner()))); |
| + |
| int result = base::LaunchUnitTests(argc, argv, base::Bind(runTestSuite, base::Unretained(&testSuite))); |
| blink::ThreadState::detachMainThread(); |