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

Side by Side Diff: ipc/ipc_channel_mojo_unittest.cc

Issue 2322573002: misc files A-P: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ipc/ipc_channel_mojo.h" 5 #include "ipc/ipc_channel_mojo.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 1371
1372 TEST_F(IPCChannelMojoTest, SendPlatformHandle) { 1372 TEST_F(IPCChannelMojoTest, SendPlatformHandle) {
1373 InitWithMojo("IPCChannelMojoTestSendPlatformHandleClient"); 1373 InitWithMojo("IPCChannelMojoTestSendPlatformHandleClient");
1374 1374
1375 ListenerThatExpectsOK listener; 1375 ListenerThatExpectsOK listener;
1376 CreateChannel(&listener); 1376 CreateChannel(&listener);
1377 ASSERT_TRUE(ConnectChannel()); 1377 ASSERT_TRUE(ConnectChannel());
1378 1378
1379 base::ScopedTempDir temp_dir; 1379 base::ScopedTempDir temp_dir;
1380 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); 1380 ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
1381 base::File file(HandleSendingHelper::GetSendingFilePath(temp_dir.path()), 1381 base::File file(HandleSendingHelper::GetSendingFilePath(temp_dir.GetPath()),
1382 base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE | 1382 base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE |
1383 base::File::FLAG_READ); 1383 base::File::FLAG_READ);
1384 HandleSendingHelper::WriteFileThenSend(channel(), file); 1384 HandleSendingHelper::WriteFileThenSend(channel(), file);
1385 base::RunLoop().Run(); 1385 base::RunLoop().Run();
1386 1386
1387 channel()->Close(); 1387 channel()->Close();
1388 1388
1389 EXPECT_TRUE(WaitForClientShutdown()); 1389 EXPECT_TRUE(WaitForClientShutdown());
1390 DestroyChannel(); 1390 DestroyChannel();
1391 } 1391 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1427 1427
1428 TEST_F(IPCChannelMojoTest, SendPlatformHandleAndPipe) { 1428 TEST_F(IPCChannelMojoTest, SendPlatformHandleAndPipe) {
1429 InitWithMojo("IPCChannelMojoTestSendPlatformHandleAndPipeClient"); 1429 InitWithMojo("IPCChannelMojoTestSendPlatformHandleAndPipeClient");
1430 1430
1431 ListenerThatExpectsOK listener; 1431 ListenerThatExpectsOK listener;
1432 CreateChannel(&listener); 1432 CreateChannel(&listener);
1433 ASSERT_TRUE(ConnectChannel()); 1433 ASSERT_TRUE(ConnectChannel());
1434 1434
1435 base::ScopedTempDir temp_dir; 1435 base::ScopedTempDir temp_dir;
1436 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); 1436 ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
1437 base::File file(HandleSendingHelper::GetSendingFilePath(temp_dir.path()), 1437 base::File file(HandleSendingHelper::GetSendingFilePath(temp_dir.GetPath()),
1438 base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE | 1438 base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE |
1439 base::File::FLAG_READ); 1439 base::File::FLAG_READ);
1440 TestingMessagePipe pipe; 1440 TestingMessagePipe pipe;
1441 HandleSendingHelper::WriteFileAndPipeThenSend(channel(), file, &pipe); 1441 HandleSendingHelper::WriteFileAndPipeThenSend(channel(), file, &pipe);
1442 1442
1443 base::RunLoop().Run(); 1443 base::RunLoop().Run();
1444 channel()->Close(); 1444 channel()->Close();
1445 1445
1446 EXPECT_TRUE(WaitForClientShutdown()); 1446 EXPECT_TRUE(WaitForClientShutdown());
1447 DestroyChannel(); 1447 DestroyChannel();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 Connect(&listener); 1499 Connect(&listener);
1500 1500
1501 base::RunLoop().Run(); 1501 base::RunLoop().Run();
1502 1502
1503 Close(); 1503 Close();
1504 } 1504 }
1505 1505
1506 #endif // OS_LINUX 1506 #endif // OS_LINUX
1507 1507
1508 } // namespace 1508 } // namespace
OLDNEW
« no previous file with comments | « ipc/attachment_broker_privileged_win_unittest.cc ('k') | mojo/edk/embedder/platform_channel_pair_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698