Index: mojo/edk/system/remote_message_pipe_unittest.cc |
diff --git a/mojo/edk/system/remote_message_pipe_unittest.cc b/mojo/edk/system/remote_message_pipe_unittest.cc |
index 25b91c078a859e264c772b5d5dac3c8fba7931b8..18c721c1296bd7fb4b4c2213722bf1816a59f219 100644 |
--- a/mojo/edk/system/remote_message_pipe_unittest.cc |
+++ b/mojo/edk/system/remote_message_pipe_unittest.cc |
@@ -9,9 +9,6 @@ |
#include <vector> |
#include "base/bind.h" |
-#include "base/files/file_path.h" |
-#include "base/files/file_util.h" |
-#include "base/files/scoped_temp_dir.h" |
#include "base/location.h" |
#include "base/logging.h" |
#include "base/message_loop/message_loop.h" |
@@ -31,6 +28,7 @@ |
#include "mojo/edk/system/shared_buffer_dispatcher.h" |
#include "mojo/edk/system/test_utils.h" |
#include "mojo/edk/system/waiter.h" |
+#include "mojo/edk/test/scoped_test_dir.h" |
#include "mojo/edk/test/test_io_thread.h" |
#include "mojo/edk/test/test_utils.h" |
#include "mojo/edk/util/scoped_file.h" |
@@ -1024,8 +1022,7 @@ TEST_F(RemoteMessagePipeTest, MAYBE_SharedBufferPassing) { |
#define MAYBE_PlatformHandlePassing DISABLED_PlatformHandlePassing |
#endif |
TEST_F(RemoteMessagePipeTest, MAYBE_PlatformHandlePassing) { |
- base::ScopedTempDir temp_dir; |
- ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); |
+ mojo::test::ScopedTestDir test_dir; |
static const char kHello[] = "hello"; |
static const char kWorld[] = "world"; |
@@ -1039,9 +1036,7 @@ TEST_F(RemoteMessagePipeTest, MAYBE_PlatformHandlePassing) { |
scoped_refptr<MessagePipe> mp1(MessagePipe::CreateProxyLocal(&ep1)); |
BootstrapChannelEndpoints(ep0, ep1); |
- base::FilePath unused; |
- util::ScopedFILE fp( |
- base::CreateAndOpenTemporaryFileInDir(temp_dir.path(), &unused)); |
+ util::ScopedFILE fp(test_dir.CreateFile()); |
EXPECT_EQ(sizeof(kHello), fwrite(kHello, 1, sizeof(kHello), fp.get())); |
// We'll try to pass this dispatcher, which will cause a |PlatformHandle| to |
// be passed. |