Index: third_party/WebKit/Source/platform/testing/RunAllPerfTests.cpp |
diff --git a/third_party/WebKit/Source/platform/testing/RunAllPerfTests.cpp b/third_party/WebKit/Source/platform/testing/RunAllPerfTests.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..91fbefeef2e68828c52e079b90a1021bfde3e12b |
--- /dev/null |
+++ b/third_party/WebKit/Source/platform/testing/RunAllPerfTests.cpp |
@@ -0,0 +1,37 @@ |
+// Copyright (c) 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "base/bind.h" |
+#include "base/run_loop.h" |
+#include "base/test/launcher/unit_test_launcher.h" |
+#include "base/test/test_suite.h" |
+#include "base/threading/thread_task_runner_handle.h" |
+#include "content/test/blink_test_environment.h" |
+#include "mojo/edk/embedder/embedder.h" |
+#include "platform/heap/ThreadState.h" |
+#include "platform/weborigin/SchemeRegistry.h" |
+ |
+namespace { |
+ |
+int runHelper(base::TestSuite* testSuite) |
+{ |
+ content::SetUpBlinkTestEnvironment(); |
+ blink::SchemeRegistry::initialize(); |
+ |
+ int result = testSuite->Run(); |
+ |
+ content::TearDownBlinkTestEnvironment(); |
+ |
+ return result; |
+} |
+ |
+} // namespace |
+ |
+int main(int argc, char** argv) |
+{ |
+ mojo::edk::Init(); |
+ |
+ base::TestSuite testSuite(argc, argv); |
+ return base::LaunchUnitTestsSerially(argc, argv, base::Bind(&runHelper, base::Unretained(&testSuite))); |
+} |