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

Side by Side Diff: remoting/protocol/jingle_session_unittest.cc

Issue 8527018: Refactor ChannelAuthenticator so that it can be used with Authenticator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/channel_authenticator.cc ('k') | remoting/protocol/jingle_stream_connector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « remoting/protocol/channel_authenticator.cc ('k') | remoting/protocol/jingle_stream_connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698