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 #include "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 OnStateChange(Session::CLOSED)) | 232 OnStateChange(Session::CLOSED)) |
233 .Times(1); | 233 .Times(1); |
234 } else { | 234 } else { |
235 // Might pass through the CONNECTED state. | 235 // Might pass through the CONNECTED state. |
236 EXPECT_CALL(host_connection_callback_, | 236 EXPECT_CALL(host_connection_callback_, |
237 OnStateChange(Session::CONNECTED)) | 237 OnStateChange(Session::CONNECTED)) |
238 .Times(AtMost(1)); | 238 .Times(AtMost(1)); |
239 EXPECT_CALL(host_connection_callback_, | 239 EXPECT_CALL(host_connection_callback_, |
240 OnStateChange(Session::CONNECTED_CHANNELS)) | 240 OnStateChange(Session::CONNECTED_CHANNELS)) |
241 .Times(AtMost(1)); | 241 .Times(AtMost(1)); |
242 // Expect that the connection will be closed eventually. | 242 // Expect that the connection will fail. |
243 EXPECT_CALL(host_connection_callback_, | 243 EXPECT_CALL(host_connection_callback_, |
244 OnStateChange(Session::FAILED)) | 244 OnStateChange(Session::FAILED)) |
245 .Times(1) | 245 .Times(1) |
246 .WillOnce(InvokeWithoutArgs(&QuitCurrentThread)); | 246 .WillOnce(InvokeWithoutArgs(&QuitCurrentThread)); |
247 } | 247 } |
248 } | 248 } |
249 | 249 |
250 { | 250 { |
251 InSequence dummy; | 251 InSequence dummy; |
252 | 252 |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 ASSERT_TRUE(tester->WaitFinished()); | 788 ASSERT_TRUE(tester->WaitFinished()); |
789 LOG(INFO) << "Time for 500k bytes " | 789 LOG(INFO) << "Time for 500k bytes " |
790 << tester->GetElapsedTime().InMilliseconds() << " ms."; | 790 << tester->GetElapsedTime().InMilliseconds() << " ms."; |
791 | 791 |
792 // Connections must be closed while |tester| still exists. | 792 // Connections must be closed while |tester| still exists. |
793 CloseSessions(); | 793 CloseSessions(); |
794 } | 794 } |
795 | 795 |
796 } // namespace protocol | 796 } // namespace protocol |
797 } // namespace remoting | 797 } // namespace remoting |
OLD | NEW |