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

Unified Diff: components/filesystem/file_impl_unittest.cc

Issue 1995753002: [mojo-edk] Expose portable API for platform handle wrapping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 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 | « components/filesystem/file_impl.cc ('k') | components/font_service/font_service_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/filesystem/file_impl_unittest.cc
diff --git a/components/filesystem/file_impl_unittest.cc b/components/filesystem/file_impl_unittest.cc
index afe68d837cc95a915b19d33b2fd9bdda624265d4..0ecfdb889e8db04a055d35abf1dfd3adfd7c5ec5 100644
--- a/components/filesystem/file_impl_unittest.cc
+++ b/components/filesystem/file_impl_unittest.cc
@@ -9,9 +9,9 @@
#include "base/files/file.h"
#include "components/filesystem/files_test_base.h"
-#include "mojo/platform_handle/platform_handle_functions.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/public/cpp/bindings/type_converter.h"
+#include "mojo/public/cpp/system/platform_handle.h"
#include "mojo/util/capture_util.h"
using mojo::Capture;
@@ -670,13 +670,13 @@ TEST_F(FileImplTest, AsHandle) {
EXPECT_EQ(mojom::FileError::OK, error);
// Pull a file descriptor out of the scoped handle.
- MojoPlatformHandle platform_handle;
- MojoResult extract_result =
- MojoExtractPlatformHandle(handle.release().value(), &platform_handle);
- EXPECT_EQ(MOJO_RESULT_OK, extract_result);
+ base::PlatformFile platform_file;
+ MojoResult unwrap_result = mojo::UnwrapPlatformFile(std::move(handle),
+ &platform_file);
+ EXPECT_EQ(MOJO_RESULT_OK, unwrap_result);
// Pass this raw file descriptor to a base::File.
- base::File raw_file(platform_handle);
+ base::File raw_file(platform_file);
ASSERT_TRUE(raw_file.IsValid());
EXPECT_EQ(5, raw_file.WriteAtCurrentPos("hello", 5));
}
« no previous file with comments | « components/filesystem/file_impl.cc ('k') | components/font_service/font_service_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698