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

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

Issue 1423713009: EDK: Move ref counting classes to mojo/edk/util. (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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 // This file tests both |RemoteProducerDataPipeImpl| and 5 // This file tests both |RemoteProducerDataPipeImpl| and
6 // |RemoteConsumerDataPipeImpl|. 6 // |RemoteConsumerDataPipeImpl|.
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "mojo/edk/embedder/platform_channel_pair.h" 15 #include "mojo/edk/embedder/platform_channel_pair.h"
16 #include "mojo/edk/embedder/simple_platform_support.h" 16 #include "mojo/edk/embedder/simple_platform_support.h"
17 #include "mojo/edk/system/channel.h" 17 #include "mojo/edk/system/channel.h"
18 #include "mojo/edk/system/channel_endpoint.h" 18 #include "mojo/edk/system/channel_endpoint.h"
19 #include "mojo/edk/system/data_pipe.h" 19 #include "mojo/edk/system/data_pipe.h"
20 #include "mojo/edk/system/data_pipe_consumer_dispatcher.h" 20 #include "mojo/edk/system/data_pipe_consumer_dispatcher.h"
21 #include "mojo/edk/system/data_pipe_producer_dispatcher.h" 21 #include "mojo/edk/system/data_pipe_producer_dispatcher.h"
22 #include "mojo/edk/system/memory.h" 22 #include "mojo/edk/system/memory.h"
23 #include "mojo/edk/system/message_pipe.h" 23 #include "mojo/edk/system/message_pipe.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"
26 #include "mojo/edk/system/test/test_io_thread.h" 25 #include "mojo/edk/system/test/test_io_thread.h"
27 #include "mojo/edk/system/test/timeouts.h" 26 #include "mojo/edk/system/test/timeouts.h"
28 #include "mojo/edk/system/waiter.h" 27 #include "mojo/edk/system/waiter.h"
28 #include "mojo/edk/util/ref_ptr.h"
29 #include "mojo/public/cpp/system/macros.h" 29 #include "mojo/public/cpp/system/macros.h"
30 #include "testing/gtest/include/gtest/gtest.h" 30 #include "testing/gtest/include/gtest/gtest.h"
31 31
32 using mojo::util::MakeRefCounted;
33 using mojo::util::RefPtr;
34
32 namespace mojo { 35 namespace mojo {
33 namespace system { 36 namespace system {
34 namespace { 37 namespace {
35 38
36 const MojoHandleSignals kAllSignals = MOJO_HANDLE_SIGNAL_READABLE | 39 const MojoHandleSignals kAllSignals = MOJO_HANDLE_SIGNAL_READABLE |
37 MOJO_HANDLE_SIGNAL_WRITABLE | 40 MOJO_HANDLE_SIGNAL_WRITABLE |
38 MOJO_HANDLE_SIGNAL_PEER_CLOSED; 41 MOJO_HANDLE_SIGNAL_PEER_CLOSED;
39 42
40 class RemoteDataPipeImplTest : public testing::Test { 43 class RemoteDataPipeImplTest : public testing::Test {
41 public: 44 public:
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 EXPECT_EQ(123456, elements[0]); 502 EXPECT_EQ(123456, elements[0]);
500 EXPECT_EQ(789012, elements[1]); 503 EXPECT_EQ(789012, elements[1]);
501 EXPECT_EQ(0, elements[2]); 504 EXPECT_EQ(0, elements[2]);
502 505
503 consumer->Close(); 506 consumer->Close();
504 } 507 }
505 508
506 } // namespace 509 } // namespace
507 } // namespace system 510 } // namespace system
508 } // namespace mojo 511 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/remote_consumer_data_pipe_impl.cc ('k') | mojo/edk/system/remote_message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698