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

Unified Diff: mojo/public/tests/test_support_private.cc

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
« no previous file with comments | « mojo/public/tests/test_support_private.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tests/test_support_private.cc
diff --git a/mojo/public/tests/test_support_private.cc b/mojo/public/tests/test_support_private.cc
index d7d02e8e3bcc804aef794abe0cca4ff5c69285f4..fa5ead44ba294e5e139a57f540e9bb966fbbbc79 100644
--- a/mojo/public/tests/test_support_private.cc
+++ b/mojo/public/tests/test_support_private.cc
@@ -5,8 +5,8 @@
#include "mojo/public/tests/test_support_private.h"
#include <assert.h>
-#include <stddef.h>
#include <stdio.h>
+#include <stdlib.h>
static mojo::test::TestSupport* g_test_support = NULL;
@@ -21,6 +21,26 @@ void MojoTestSupportLogPerfResult(const char* test_name,
printf("[no test runner]\t%s\t%g\t%s\n", test_name, value, units);
}
+FILE* MojoTestSupportOpenSourceRootRelativeFile(const char* relative_path) {
+ if (g_test_support)
+ return g_test_support->OpenSourceRootRelativeFile(relative_path);
+ printf("[no test runner]\n");
+ return NULL;
+}
+
+char** MojoTestSupportEnumerateSourceRootRelativeDirectory(
+ const char* relative_path) {
+ if (g_test_support)
+ return g_test_support->EnumerateSourceRootRelativeDirectory(relative_path);
+
+ printf("[no test runner]\n");
+
+ // Return empty list:
+ char** rv = static_cast<char**>(calloc(1, sizeof(char*)));
+ rv[0] = NULL;
+ return rv;
+}
+
} // extern "C"
namespace mojo {
« no previous file with comments | « mojo/public/tests/test_support_private.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698