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

Side by Side Diff: mojo/edk/system/multiprocess_message_pipe_unittest.cc

Issue 1427633003: Move scoped_test_dir.* and test_io_thread.* from edk/test to edk/system/test. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stdint.h> 5 #include <stdint.h>
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "build/build_config.h" // TODO(vtl): Remove this. 16 #include "build/build_config.h" // TODO(vtl): Remove this.
17 #include "mojo/edk/embedder/platform_shared_buffer.h" 17 #include "mojo/edk/embedder/platform_shared_buffer.h"
18 #include "mojo/edk/embedder/scoped_platform_handle.h" 18 #include "mojo/edk/embedder/scoped_platform_handle.h"
19 #include "mojo/edk/system/channel.h" 19 #include "mojo/edk/system/channel.h"
20 #include "mojo/edk/system/dispatcher.h" 20 #include "mojo/edk/system/dispatcher.h"
21 #include "mojo/edk/system/message_pipe.h" 21 #include "mojo/edk/system/message_pipe.h"
22 #include "mojo/edk/system/message_pipe_test_utils.h" 22 #include "mojo/edk/system/message_pipe_test_utils.h"
23 #include "mojo/edk/system/platform_handle_dispatcher.h" 23 #include "mojo/edk/system/platform_handle_dispatcher.h"
24 #include "mojo/edk/system/raw_channel.h" 24 #include "mojo/edk/system/raw_channel.h"
25 #include "mojo/edk/system/ref_ptr.h" 25 #include "mojo/edk/system/ref_ptr.h"
26 #include "mojo/edk/system/shared_buffer_dispatcher.h" 26 #include "mojo/edk/system/shared_buffer_dispatcher.h"
27 #include "mojo/edk/test/scoped_test_dir.h" 27 #include "mojo/edk/system/test/scoped_test_dir.h"
28 #include "mojo/edk/test/test_utils.h" 28 #include "mojo/edk/test/test_utils.h"
29 #include "mojo/edk/util/scoped_file.h" 29 #include "mojo/edk/util/scoped_file.h"
30 #include "testing/gtest/include/gtest/gtest.h" 30 #include "testing/gtest/include/gtest/gtest.h"
31 31
32 namespace mojo { 32 namespace mojo {
33 namespace system { 33 namespace system {
34 namespace { 34 namespace {
35 35
36 class MultiprocessMessagePipeTest 36 class MultiprocessMessagePipeTest
37 : public test::MultiprocessMessagePipeTestBase {}; 37 : public test::MultiprocessMessagePipeTestBase {};
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 } 439 }
440 440
441 return 0; 441 return 0;
442 } 442 }
443 443
444 class MultiprocessMessagePipeTestWithPipeCount 444 class MultiprocessMessagePipeTestWithPipeCount
445 : public test::MultiprocessMessagePipeTestBase, 445 : public test::MultiprocessMessagePipeTestBase,
446 public testing::WithParamInterface<size_t> {}; 446 public testing::WithParamInterface<size_t> {};
447 447
448 TEST_P(MultiprocessMessagePipeTestWithPipeCount, PlatformHandlePassing) { 448 TEST_P(MultiprocessMessagePipeTestWithPipeCount, PlatformHandlePassing) {
449 mojo::test::ScopedTestDir test_dir; 449 test::ScopedTestDir test_dir;
450 450
451 helper()->StartChild("CheckPlatformHandleFile"); 451 helper()->StartChild("CheckPlatformHandleFile");
452 452
453 RefPtr<ChannelEndpoint> ep; 453 RefPtr<ChannelEndpoint> ep;
454 auto mp = MessagePipe::CreateLocalProxy(&ep); 454 auto mp = MessagePipe::CreateLocalProxy(&ep);
455 Init(std::move(ep)); 455 Init(std::move(ep));
456 456
457 std::vector<RefPtr<PlatformHandleDispatcher>> dispatchers; 457 std::vector<RefPtr<PlatformHandleDispatcher>> dispatchers;
458 std::vector<DispatcherTransport> transports; 458 std::vector<DispatcherTransport> transports;
459 459
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 // Android multi-process tests are not executing the new process. This is flaky. 504 // Android multi-process tests are not executing the new process. This is flaky.
505 #if !defined(OS_ANDROID) 505 #if !defined(OS_ANDROID)
506 INSTANTIATE_TEST_CASE_P(PipeCount, 506 INSTANTIATE_TEST_CASE_P(PipeCount,
507 MultiprocessMessagePipeTestWithPipeCount, 507 MultiprocessMessagePipeTestWithPipeCount,
508 testing::Values(1u, 128u, 140u)); 508 testing::Values(1u, 128u, 140u));
509 #endif 509 #endif
510 510
511 } // namespace 511 } // namespace
512 } // namespace system 512 } // namespace system
513 } // namespace mojo 513 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/message_pipe_test_utils.cc ('k') | mojo/edk/system/platform_handle_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698