Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Unified Diff: third_party/WebKit/Source/platform/testing/RunAllPerfTests.cpp

Issue 2319053004: [Reland] Make canceling Timers fast. (Closed)
Patch Set: Getting printf to work with size_t cross platform is too hard, use C++ io streams instead Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..0709f0850f4bcfcb0a64c8c8f93a4abfca5bcffe
--- /dev/null
+++ b/third_party/WebKit/Source/platform/testing/RunAllPerfTests.cpp
@@ -0,0 +1,34 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
haraken 2016/09/09 02:34:07 Hmm, I'm not sure if it's worth introducing RunAll
alex clarke (OOO till 29th) 2016/09/09 09:40:59 I didn't think we were allowed to use things from
haraken 2016/09/09 13:19:53 Sorry, where is TimerPerfTest using web/?
+// 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 "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)
+{
+ base::TestSuite testSuite(argc, argv);
+ return base::LaunchUnitTestsSerially(argc, argv, base::Bind(&runHelper, base::Unretained(&testSuite)));
+}

Powered by Google App Engine
This is Rietveld 408576698