OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Unit test for SyncChannel. | 5 // Unit test for SyncChannel. |
6 | 6 |
7 #include "ipc/ipc_sync_channel.h" | 7 #include "ipc/ipc_sync_channel.h" |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
16 #include "base/stl_util-inl.h" | 16 #include "base/stl_util.h" |
17 #include "base/string_util.h" | 17 #include "base/string_util.h" |
18 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" | 18 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" |
19 #include "base/threading/platform_thread.h" | 19 #include "base/threading/platform_thread.h" |
20 #include "base/threading/thread.h" | 20 #include "base/threading/thread.h" |
21 #include "base/synchronization/waitable_event.h" | 21 #include "base/synchronization/waitable_event.h" |
22 #include "ipc/ipc_message.h" | 22 #include "ipc/ipc_message.h" |
23 #include "ipc/ipc_sync_message_filter.h" | 23 #include "ipc/ipc_sync_message_filter.h" |
24 #include "ipc/ipc_sync_message_unittest.h" | 24 #include "ipc/ipc_sync_message_unittest.h" |
25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
26 | 26 |
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1318 std::vector<Worker*> workers; | 1318 std::vector<Worker*> workers; |
1319 workers.push_back(new NonRestrictedDispatchServer); | 1319 workers.push_back(new NonRestrictedDispatchServer); |
1320 workers.push_back(server); | 1320 workers.push_back(server); |
1321 workers.push_back( | 1321 workers.push_back( |
1322 new RestrictedDispatchClient(&sent_ping_event, server, &success)); | 1322 new RestrictedDispatchClient(&sent_ping_event, server, &success)); |
1323 RunTest(workers); | 1323 RunTest(workers); |
1324 EXPECT_EQ(3, success); | 1324 EXPECT_EQ(3, success); |
1325 } | 1325 } |
1326 | 1326 |
1327 } // namespace IPC | 1327 } // namespace IPC |
OLD | NEW |