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

Unified Diff: remoting/protocol/connection_to_client_unittest.cc

Issue 850983002: Implement video frame acknowledgements in the chromoting protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months 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
Index: remoting/protocol/connection_to_client_unittest.cc
diff --git a/remoting/protocol/connection_to_client_unittest.cc b/remoting/protocol/connection_to_client_unittest.cc
index e123cfaf0db922a7a6492d43de476d2977d6ac2f..613ccaf2c9c4c899a5dde0c5b87cb3a215394bc4 100644
--- a/remoting/protocol/connection_to_client_unittest.cc
+++ b/remoting/protocol/connection_to_client_unittest.cc
@@ -11,6 +11,7 @@
#include "remoting/base/constants.h"
#include "remoting/protocol/fake_session.h"
#include "remoting/protocol/protocol_mock_objects.h"
+#include "remoting/protocol/video_stub.h"
#include "testing/gmock/include/gmock/gmock.h"
using ::testing::_;
@@ -20,6 +21,13 @@ using ::testing::StrictMock;
namespace remoting {
namespace protocol {
+namespace {
+
+void IgnoreProgress(VideoStub::PacketProgress progress) {
+}
+
+}
+
class ConnectionToClientTest : public testing::Test {
public:
ConnectionToClientTest() {
@@ -63,7 +71,8 @@ class ConnectionToClientTest : public testing::Test {
TEST_F(ConnectionToClientTest, SendUpdateStream) {
scoped_ptr<VideoPacket> packet(new VideoPacket());
- viewer_->video_stub()->ProcessVideoPacket(packet.Pass(), base::Closure());
+ viewer_->video_stub()->ProcessVideoPacket(packet.Pass(),
+ base::Bind(&IgnoreProgress));
base::RunLoop().RunUntilIdle();
@@ -82,7 +91,8 @@ TEST_F(ConnectionToClientTest, SendUpdateStream) {
TEST_F(ConnectionToClientTest, NoWriteAfterDisconnect) {
scoped_ptr<VideoPacket> packet(new VideoPacket());
- viewer_->video_stub()->ProcessVideoPacket(packet.Pass(), base::Closure());
+ viewer_->video_stub()->ProcessVideoPacket(packet.Pass(),
+ base::Bind(&IgnoreProgress));
// And then close the connection to ConnectionToClient.
viewer_->Disconnect();

Powered by Google App Engine
This is Rietveld 408576698