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

Unified Diff: mojo/public/tests/test_support.h

Issue 23621056: Initial in-process implementation of some Mojo primitives. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 7 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: mojo/public/tests/test_support.h
diff --git a/mojo/public/tests/test_support.h b/mojo/public/tests/test_support.h
new file mode 100644
index 0000000000000000000000000000000000000000..34ec0bf76a27d61012059d1ce89ac243d0311433
--- /dev/null
+++ b/mojo/public/tests/test_support.h
@@ -0,0 +1,36 @@
+// Copyright 2013 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.
+
+#ifndef MOJO_PUBLIC_TESTS_TEST_SUPPORT_H_
+#define MOJO_PUBLIC_TESTS_TEST_SUPPORT_H_
+
+#include "base/basictypes.h"
+#include "base/callback.h"
+#include "base/compiler_specific.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace mojo {
+namespace test {
+
+class TestBase : public testing::Test {
+ public:
+ TestBase();
+ virtual ~TestBase();
+
+ virtual void SetUp() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TestBase);
+};
+
+// Run |single_iteration| an appropriate number of times and report its
+// performance appropriately. (This actually runs |single_iteration| for a fixed
+// amount of time and reports the number of iterations per unit time.)
+void IterateAndReportPerf(const char* test_name,
+ base::Callback<void()> single_iteration);
+
+} // namespace test
+} // namespace mojo
+
+#endif // MOJO_PUBLIC_TESTS_TEST_SUPPORT_H_

Powered by Google App Engine
This is Rietveld 408576698