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

Unified Diff: remoting/host/client_connection_unittest.cc

Issue 4313001: Rename classes for Chromoting: (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: Resolve merge conflicts Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/client_connection.cc ('k') | remoting/protocol/chromotocol_server.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_connection_unittest.cc
diff --git a/remoting/host/client_connection_unittest.cc b/remoting/host/client_connection_unittest.cc
index b5802cf65cfce691ccefc5a786cf6e5321e7c5da..7c043bbed4f81cac30d96bf2472fb76209d6c931 100644
--- a/remoting/host/client_connection_unittest.cc
+++ b/remoting/host/client_connection_unittest.cc
@@ -6,7 +6,7 @@
#include "remoting/base/mock_objects.h"
#include "remoting/host/client_connection.h"
#include "remoting/host/mock_objects.h"
-#include "remoting/protocol/fake_connection.h"
+#include "remoting/protocol/fake_session.h"
#include "testing/gmock/include/gmock/gmock.h"
using ::testing::_;
@@ -22,15 +22,15 @@ class ClientConnectionTest : public testing::Test {
protected:
virtual void SetUp() {
- connection_ = new FakeChromotocolConnection();
- connection_->set_message_loop(&message_loop_);
+ session_ = new protocol::FakeSession();
+ session_->set_message_loop(&message_loop_);
// Allocate a ClientConnection object with the mock objects.
viewer_ = new ClientConnection(&message_loop_, &handler_);
- viewer_->Init(connection_);
+ viewer_->Init(session_);
EXPECT_CALL(handler_, OnConnectionOpened(viewer_.get()));
- connection_->state_change_callback()->Run(
- ChromotocolConnection::CONNECTED);
+ session_->state_change_callback()->Run(
+ protocol::Session::CONNECTED);
message_loop_.RunAllPending();
}
@@ -38,7 +38,7 @@ class ClientConnectionTest : public testing::Test {
MockClientConnectionEventHandler handler_;
scoped_refptr<ClientConnection> viewer_;
- scoped_refptr<FakeChromotocolConnection> connection_;
+ scoped_refptr<protocol::FakeSession> session_;
private:
DISALLOW_COPY_AND_ASSIGN(ClientConnectionTest);
@@ -56,16 +56,16 @@ TEST_F(ClientConnectionTest, SendUpdateStream) {
// Verify that something has been written.
// TODO(sergeyu): Verify that the correct data has been written.
- EXPECT_GT(connection_->video_channel()->written_data().size(), 0u);
+ EXPECT_GT(session_->video_channel()->written_data().size(), 0u);
}
TEST_F(ClientConnectionTest, StateChange) {
EXPECT_CALL(handler_, OnConnectionClosed(viewer_.get()));
- connection_->state_change_callback()->Run(ChromotocolConnection::CLOSED);
+ session_->state_change_callback()->Run(protocol::Session::CLOSED);
message_loop_.RunAllPending();
EXPECT_CALL(handler_, OnConnectionFailed(viewer_.get()));
- connection_->state_change_callback()->Run(ChromotocolConnection::FAILED);
+ session_->state_change_callback()->Run(protocol::Session::FAILED);
message_loop_.RunAllPending();
}
@@ -74,7 +74,7 @@ TEST_F(ClientConnectionTest, StateChange) {
TEST_F(ClientConnectionTest, Close) {
viewer_->Disconnect();
message_loop_.RunAllPending();
- EXPECT_TRUE(connection_->is_closed());
+ EXPECT_TRUE(session_->is_closed());
VideoPacket packet;
viewer_->SendVideoPacket(packet);
@@ -82,7 +82,7 @@ TEST_F(ClientConnectionTest, Close) {
message_loop_.RunAllPending();
// Verify that nothing has been written.
- EXPECT_EQ(connection_->video_channel()->written_data().size(), 0u);
+ EXPECT_EQ(session_->video_channel()->written_data().size(), 0u);
}
} // namespace remoting
« no previous file with comments | « remoting/host/client_connection.cc ('k') | remoting/protocol/chromotocol_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698