Skip to content

Commit

Permalink
Switch to simpler base::WriteFile() variants (117/N)
Browse files Browse the repository at this point in the history
This CL is part of a batch of CLs to replace the use of the less
friendly base::WriteFile call with simpler variants, which are easier to
read, and less prone to mistakes.

Changes in this particular CL address files under the path
/mojo/core.

This CL was uploaded by git cl split.

R=rsesek@chromium.org

AX-Relnotes: n/a.
Bug: 418837
Change-Id: Ic23bf27abc81834c64fa28a9c576fd88f8c32f2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4288225
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Auto-Submit: Claudio DeSouza <cdesouza@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1110375}
  • Loading branch information
cdesouza-chromium authored and Chromium LUCI CQ committed Feb 27, 2023
1 parent 73031b7 commit 1389be9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mojo/core/platform_wrapper_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ TEST_F(PlatformWrapperTest, WrapPlatformHandle) {
base::FilePath temp_file_path;
ASSERT_TRUE(base::CreateTemporaryFile(&temp_file_path));
const std::string kMessage = "Hello, world!";
EXPECT_EQ(base::WriteFile(temp_file_path, kMessage.data(),
static_cast<int>(kMessage.size())),
static_cast<int>(kMessage.size()));
ASSERT_TRUE(base::WriteFile(temp_file_path, kMessage));

RunTestClient("ReadPlatformFile", [&](MojoHandle h) {
// Open the temporary file for reading, wrap its handle, and send it to
Expand Down

0 comments on commit 1389be9

Please sign in to comment.