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

Unified Diff: third_party/mojo/src/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc

Issue 1310103002: Update mojo sdk to rev c02a28868825edfa57ab77947b8cb15e741c5598 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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: third_party/mojo/src/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc
diff --git a/third_party/mojo/src/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc b/third_party/mojo/src/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc
index 897929fee13d266ef6da9685bb35e16a449f47e4..c7b49c210f0aa20c02c77517bee0da0d0ff1bb67 100644
--- a/third_party/mojo/src/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc
+++ b/third_party/mojo/src/mojo/edk/embedder/platform_channel_pair_posix_unittest.cc
@@ -15,10 +15,7 @@
#include <deque>
-#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/logging.h"
#include "mojo/edk/embedder/platform_channel_utils_posix.h"
#include "mojo/edk/embedder/platform_handle.h"
@@ -128,9 +125,6 @@ TEST_F(PlatformChannelPairPosixTest, SendReceiveData) {
}
TEST_F(PlatformChannelPairPosixTest, SendReceiveFDs) {
- base::ScopedTempDir temp_dir;
- ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
-
static const char kHello[] = "hello";
PlatformChannelPair channel_pair;
@@ -150,9 +144,7 @@ TEST_F(PlatformChannelPairPosixTest, SendReceiveFDs) {
const char c = '0' + (i % 10);
ScopedPlatformHandleVectorPtr platform_handles(new PlatformHandleVector);
for (size_t j = 1; j <= i; j++) {
- base::FilePath unused;
- base::ScopedFILE fp(
- base::CreateAndOpenTemporaryFileInDir(temp_dir.path(), &unused));
+ base::ScopedFILE fp(tmpfile());
ASSERT_TRUE(fp);
ASSERT_EQ(j, fwrite(std::string(j, c).data(), 1, j, fp.get()));
platform_handles->push_back(
@@ -194,9 +186,6 @@ TEST_F(PlatformChannelPairPosixTest, SendReceiveFDs) {
}
TEST_F(PlatformChannelPairPosixTest, AppendReceivedFDs) {
- base::ScopedTempDir temp_dir;
- ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
-
static const char kHello[] = "hello";
PlatformChannelPair channel_pair;
@@ -206,9 +195,7 @@ TEST_F(PlatformChannelPairPosixTest, AppendReceivedFDs) {
const std::string file_contents("hello world");
{
- base::FilePath unused;
- base::ScopedFILE fp(
- base::CreateAndOpenTemporaryFileInDir(temp_dir.path(), &unused));
+ base::ScopedFILE fp(tmpfile());
ASSERT_TRUE(fp);
ASSERT_EQ(file_contents.size(),
fwrite(file_contents.data(), 1, file_contents.size(), fp.get()));

Powered by Google App Engine
This is Rietveld 408576698