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

Unified Diff: mojo/edk/system/raw_channel_unittest.cc

Issue 1347783002: Add our own (mojo::util::)ScopedFILE and replace uses of base::ScopedFILE with it. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 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
Index: mojo/edk/system/raw_channel_unittest.cc
diff --git a/mojo/edk/system/raw_channel_unittest.cc b/mojo/edk/system/raw_channel_unittest.cc
index 9f7838c2f9e39f5fde2bcb42bbb59b7a58708558..db11b5b395a5ecff0321cb02d77b53aa6a15b1d0 100644
--- a/mojo/edk/system/raw_channel_unittest.cc
+++ b/mojo/edk/system/raw_channel_unittest.cc
@@ -12,7 +12,6 @@
#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
-#include "base/files/scoped_file.h"
#include "base/files/scoped_temp_dir.h"
#include "base/location.h"
#include "base/logging.h"
@@ -30,6 +29,7 @@
#include "mojo/edk/system/transport_data.h"
#include "mojo/edk/test/test_io_thread.h"
#include "mojo/edk/test/test_utils.h"
+#include "mojo/edk/util/scoped_file.h"
#include "mojo/public/cpp/system/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -763,7 +763,7 @@ class ReadPlatformHandlesCheckerRawChannelDelegate
{
char buffer[100] = {};
- base::ScopedFILE fp(mojo::test::FILEFromPlatformHandle(h1.Pass(), "rb"));
+ util::ScopedFILE fp(mojo::test::FILEFromPlatformHandle(h1.Pass(), "rb"));
EXPECT_TRUE(fp);
rewind(fp.get());
EXPECT_EQ(1u, fread(buffer, 1, sizeof(buffer), fp.get()));
@@ -772,7 +772,7 @@ class ReadPlatformHandlesCheckerRawChannelDelegate
{
char buffer[100] = {};
- base::ScopedFILE fp(mojo::test::FILEFromPlatformHandle(h2.Pass(), "rb"));
+ util::ScopedFILE fp(mojo::test::FILEFromPlatformHandle(h2.Pass(), "rb"));
EXPECT_TRUE(fp);
rewind(fp.get());
EXPECT_EQ(1u, fread(buffer, 1, sizeof(buffer), fp.get()));
@@ -817,10 +817,10 @@ TEST_F(RawChannelTest, MAYBE_ReadWritePlatformHandles) {
base::Unretained(&read_delegate)));
base::FilePath unused;
- base::ScopedFILE fp1(
+ util::ScopedFILE fp1(
base::CreateAndOpenTemporaryFileInDir(temp_dir.path(), &unused));
EXPECT_EQ(1u, fwrite("1", 1, 1, fp1.get()));
- base::ScopedFILE fp2(
+ util::ScopedFILE fp2(
base::CreateAndOpenTemporaryFileInDir(temp_dir.path(), &unused));
EXPECT_EQ(1u, fwrite("2", 1, 1, fp2.get()));

Powered by Google App Engine
This is Rietveld 408576698