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

Unified Diff: mojo/common/test/test_utils.h

Issue 273023003: Mojo: Add test utils to go between a ScopedPlatformHandle and a ScopedFILE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/common/test/test_utils_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/common/test/test_utils.h
diff --git a/mojo/common/test/test_utils.h b/mojo/common/test/test_utils.h
index 6b9be227ad7191357a37e4dd2a41bcae4352f726..711dfe41ab0437503a531a512f34e5d221892f1f 100644
--- a/mojo/common/test/test_utils.h
+++ b/mojo/common/test/test_utils.h
@@ -6,17 +6,16 @@
#define MOJO_COMMON_TEST_TEST_UTILS_H_
#include <stddef.h>
+#include <stdio.h>
#include <string>
#include "base/files/file_path.h"
+#include "base/files/scoped_file.h"
+#include "mojo/embedder/platform_handle.h"
+#include "mojo/embedder/scoped_platform_handle.h"
namespace mojo {
-
-namespace embedder {
-struct PlatformHandle;
-}
-
namespace test {
// On success, |bytes_written| is updated to the number of bytes written;
@@ -42,6 +41,13 @@ bool NonBlockingRead(const embedder::PlatformHandle& handle,
size_t buffer_size,
size_t* bytes_read);
+// Gets a (scoped) |PlatformHandle| from the given (scoped) |FILE|.
+embedder::ScopedPlatformHandle PlatformHandleFromFILE(base::ScopedFILE fp);
+
+// Gets a (scoped) |FILE| from a (scoped) |PlatformHandle|.
+base::ScopedFILE FILEFromPlatformHandle(embedder::ScopedPlatformHandle h,
+ const char* mode);
+
// Returns the path to the mojom js bindings file.
base::FilePath GetFilePathForJSResource(const std::string& path);
« no previous file with comments | « no previous file | mojo/common/test/test_utils_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698