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
3 // found in the LICENSE file.
4 
5 #ifndef MOJO_CORE_TEST_TEST_UTILS_H_
6 #define MOJO_CORE_TEST_TEST_UTILS_H_
7 
8 #include <stddef.h>
9 #include <stdio.h>
10 
11 #include <string>
12 
13 #include "base/files/scoped_file.h"
14 #include "mojo/public/cpp/platform/platform_handle.h"
15 
16 namespace mojo {
17 namespace core {
18 namespace test {
19 
20 // Gets a (scoped) |PlatformHandle| from the given (scoped) |FILE|.
21 PlatformHandle PlatformHandleFromFILE(base::ScopedFILE fp);
22 
23 // Gets a (scoped) |FILE| from a (scoped) |PlatformHandle|.
24 base::ScopedFILE FILEFromPlatformHandle(PlatformHandle h, const char* mode);
25 
26 }  // namespace test
27 }  // namespace core
28 }  // namespace mojo
29 
30 #endif  // MOJO_CORE_TEST_TEST_UTILS_H_
31