OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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> |
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1018 SendWithTimeoutOK(true); | 1018 SendWithTimeoutOK(true); |
1019 } | 1019 } |
1020 | 1020 |
1021 // Tests that SendWithTimeout does time-out. | 1021 // Tests that SendWithTimeout does time-out. |
1022 TEST_F(IPCSyncChannelTest, SendWithTimeoutTimeout) { | 1022 TEST_F(IPCSyncChannelTest, SendWithTimeoutTimeout) { |
1023 SendWithTimeoutTimeout(false); | 1023 SendWithTimeoutTimeout(false); |
1024 SendWithTimeoutTimeout(true); | 1024 SendWithTimeoutTimeout(true); |
1025 } | 1025 } |
1026 | 1026 |
1027 // Sends some message that time-out and some that succeed. | 1027 // Sends some message that time-out and some that succeed. |
1028 // Crashes flakily, http://crbug.com/70075. | 1028 TEST_F(IPCSyncChannelTest, SendWithTimeoutMixedOKAndTimeout) { |
1029 TEST_F(IPCSyncChannelTest, DISABLED_SendWithTimeoutMixedOKAndTimeout) { | |
1030 SendWithTimeoutMixedOKAndTimeout(false); | 1029 SendWithTimeoutMixedOKAndTimeout(false); |
1031 SendWithTimeoutMixedOKAndTimeout(true); | 1030 SendWithTimeoutMixedOKAndTimeout(true); |
1032 } | 1031 } |
1033 | 1032 |
1034 //------------------------------------------------------------------------------ | 1033 //------------------------------------------------------------------------------ |
1035 | 1034 |
1036 namespace { | 1035 namespace { |
1037 | 1036 |
1038 void NestedCallback(Worker* server) { | 1037 void NestedCallback(Worker* server) { |
1039 // Sleep a bit so that we wake up after the reply has been received. | 1038 // Sleep a bit so that we wake up after the reply has been received. |
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1945 channel_id, | 1944 channel_id, |
1946 "Got first message"); | 1945 "Got first message"); |
1947 workers.push_back(worker); | 1946 workers.push_back(worker); |
1948 | 1947 |
1949 worker = new VerifiedClient(&client_worker_thread, | 1948 worker = new VerifiedClient(&client_worker_thread, |
1950 channel_id, | 1949 channel_id, |
1951 "Got first message"); | 1950 "Got first message"); |
1952 workers.push_back(worker); | 1951 workers.push_back(worker); |
1953 | 1952 |
1954 RunTest(workers); | 1953 RunTest(workers); |
1955 | |
1956 #if defined(OS_WIN) | |
1957 #endif | |
1958 } | 1954 } |
1959 | 1955 |
1960 } // namespace | 1956 } // namespace |
1961 | 1957 |
1962 // Windows needs to send an out-of-band secret to verify the client end of the | 1958 // Windows needs to send an out-of-band secret to verify the client end of the |
1963 // channel. Test that we still connect correctly in that case. | 1959 // channel. Test that we still connect correctly in that case. |
1964 TEST_F(IPCSyncChannelTest, Verified) { | 1960 TEST_F(IPCSyncChannelTest, Verified) { |
1965 Verified(); | 1961 Verified(); |
1966 } | 1962 } |
1967 | 1963 |
1968 } // namespace IPC | 1964 } // namespace IPC |
OLD | NEW |