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

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

Issue 229683005: Validate MessageHeader before using (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove debug printfs Created 6 years, 8 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/cpp/test_support/test_support.h
diff --git a/mojo/public/cpp/test_support/test_support.h b/mojo/public/cpp/test_support/test_support.h
index d0a8eb8cfc0f272f6e2608d00e4d99a166e2bd2f..eb4d4be7116a7f3fac94b633702f60abafde628e 100644
--- a/mojo/public/cpp/test_support/test_support.h
+++ b/mojo/public/cpp/test_support/test_support.h
@@ -5,6 +5,9 @@
#ifndef MOJO_PUBLIC_CPP_TEST_SUPPORT_TEST_SUPPORT_H_
#define MOJO_PUBLIC_CPP_TEST_SUPPORT_TEST_SUPPORT_H_
+#include <string>
+#include <vector>
+
#include "mojo/public/c/test_support/test_support.h"
namespace mojo {
@@ -16,6 +19,15 @@ inline void LogPerfResult(const char* test_name,
MojoTestSupportLogPerfResult(test_name, value, units);
}
+// Opens text file relative to the source root for reading.
+inline FILE* OpenSourceRootRelativeFile(const std::string& relative_path) {
+ return MojoTestSupportOpenSourceRootRelativeFile(relative_path.c_str());
+}
+
+// Returns the list of regular files in a directory relative to the source root.
+std::vector<std::string> EnumerateSourceRootRelativeDirectory(
+ const std::string& relative_path);
+
} // namespace test
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698