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

Side by Side Diff: remoting/host/chromoting_host_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, 10 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 unified diff | Download patch
OLDNEW
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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "remoting/base/auto_thread_task_runner.h" 9 #include "remoting/base/auto_thread_task_runner.h"
10 #include "remoting/host/audio_capturer.h" 10 #include "remoting/host/audio_capturer.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 using testing::Sequence; 50 using testing::Sequence;
51 51
52 namespace remoting { 52 namespace remoting {
53 53
54 namespace { 54 namespace {
55 55
56 void PostQuitTask(base::MessageLoop* message_loop) { 56 void PostQuitTask(base::MessageLoop* message_loop) {
57 message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); 57 message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
58 } 58 }
59 59
60 // Run the task and delete it afterwards. This action is used to deal with 60 // This action is used to call the done callbacks for the VideoCapturer.
61 // done callbacks.
62 ACTION(RunDoneTask) { 61 ACTION(RunDoneTask) {
63 arg1.Run(); 62 arg1.Run(protocol::VideoStub::PacketProgress::SENT);
63 arg1.Run(protocol::VideoStub::PacketProgress::DONE);
64 } 64 }
65 65
66 } // namespace 66 } // namespace
67 67
68 class ChromotingHostTest : public testing::Test { 68 class ChromotingHostTest : public testing::Test {
69 public: 69 public:
70 ChromotingHostTest() { 70 ChromotingHostTest() {
71 } 71 }
72 72
73 void SetUp() override { 73 void SetUp() override {
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 ExpectClientDisconnected(0, true, video_packet_sent, 711 ExpectClientDisconnected(0, true, video_packet_sent,
712 InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost)); 712 InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost));
713 EXPECT_CALL(host_status_observer_, OnShutdown()); 713 EXPECT_CALL(host_status_observer_, OnShutdown());
714 714
715 host_->Start(xmpp_login_); 715 host_->Start(xmpp_login_);
716 SimulateClientConnection(0, true, false); 716 SimulateClientConnection(0, true, false);
717 message_loop_.Run(); 717 message_loop_.Run();
718 } 718 }
719 719
720 } // namespace remoting 720 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698