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

Side by Side Diff: mojo/public/c/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, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/mojo_public.gypi ('k') | mojo/public/cpp/bindings/lib/connector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_PUBLIC_C_TEST_SUPPORT_TEST_SUPPORT_H_ 5 #ifndef MOJO_PUBLIC_C_TEST_SUPPORT_TEST_SUPPORT_H_
6 #define MOJO_PUBLIC_C_TEST_SUPPORT_TEST_SUPPORT_H_ 6 #define MOJO_PUBLIC_C_TEST_SUPPORT_TEST_SUPPORT_H_
7 7
8 // Note: This header should be compilable as C. 8 // Note: This header should be compilable as C.
9 9
10 #include <stdio.h>
11
10 #include "mojo/public/c/test_support/test_support_export.h" 12 #include "mojo/public/c/test_support/test_support_export.h"
11 13
12 #ifdef __cplusplus 14 #ifdef __cplusplus
13 extern "C" { 15 extern "C" {
14 #endif 16 #endif
15 17
16 MOJO_TEST_SUPPORT_EXPORT void MojoTestSupportLogPerfResult( 18 MOJO_TEST_SUPPORT_EXPORT void MojoTestSupportLogPerfResult(
17 const char* test_name, 19 const char* test_name,
18 double value, 20 double value,
19 const char* units); 21 const char* units);
20 22
23 // Opens a "/"-delimited file path relative to the source root.
24 MOJO_TEST_SUPPORT_EXPORT FILE* MojoTestSupportOpenSourceRootRelativeFile(
25 const char* source_root_relative_path);
26
27 // Enumerates a "/"-delimited directory path relative to the source root.
28 // Returns only regular files. The return value is a heap-allocated array of
29 // heap-allocated strings. Each must be free'd separately.
30 //
31 // The return value is built like so:
32 //
33 // char** rv = (char**) calloc(N + 1, sizeof(char*));
34 // rv[0] = strdup("a");
35 // rv[1] = strdup("b");
36 // rv[2] = strdup("c");
37 // ...
38 // rv[N] = NULL;
39 //
40 MOJO_TEST_SUPPORT_EXPORT
41 char** MojoTestSupportEnumerateSourceRootRelativeDirectory(
42 const char* source_root_relative_path);
43
21 #ifdef __cplusplus 44 #ifdef __cplusplus
22 } // extern "C" 45 } // extern "C"
23 #endif 46 #endif
24 47
25 #endif // MOJO_PUBLIC_C_TEST_SUPPORT_TEST_SUPPORT_H_ 48 #endif // MOJO_PUBLIC_C_TEST_SUPPORT_TEST_SUPPORT_H_
OLDNEW
« no previous file with comments | « mojo/mojo_public.gypi ('k') | mojo/public/cpp/bindings/lib/connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698