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

Side by Side Diff: chrome/browser/media/cast_remoting_sender_unittest.cc

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/media/cast_remoting_sender.h" 5 #include "chrome/browser/media/cast_remoting_sender.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 const MojoCreateDataPipeOptions data_pipe_options{ 125 const MojoCreateDataPipeOptions data_pipe_options{
126 sizeof(MojoCreateDataPipeOptions), 126 sizeof(MojoCreateDataPipeOptions),
127 MOJO_CREATE_DATA_PIPE_OPTIONS_FLAG_NONE, 1, kDataPipeCapacity }; 127 MOJO_CREATE_DATA_PIPE_OPTIONS_FLAG_NONE, 1, kDataPipeCapacity };
128 mojo::ScopedDataPipeConsumerHandle consumer_end; 128 mojo::ScopedDataPipeConsumerHandle consumer_end;
129 CHECK_EQ(MOJO_RESULT_OK, 129 CHECK_EQ(MOJO_RESULT_OK,
130 mojo::CreateDataPipe(&data_pipe_options, &producer_end_, 130 mojo::CreateDataPipe(&data_pipe_options, &producer_end_,
131 &consumer_end)); 131 &consumer_end));
132 132
133 CastRemotingSender::FindAndBind( 133 CastRemotingSender::FindAndBind(
134 transport_config_.rtp_stream_id, std::move(consumer_end), 134 transport_config_.rtp_stream_id, std::move(consumer_end),
135 GetProxy(&sender_), 135 MakeRequest(&sender_),
136 base::Bind(&CastRemotingSenderTest::OnError, base::Unretained(this))); 136 base::Bind(&CastRemotingSenderTest::OnError, base::Unretained(this)));
137 137
138 RunPendingTasks(); 138 RunPendingTasks();
139 } 139 }
140 140
141 ~CastRemotingSenderTest() override {} 141 ~CastRemotingSenderTest() override {}
142 142
143 void TearDown() final { 143 void TearDown() final {
144 remoting_sender_.reset(); 144 remoting_sender_.reset();
145 // Allow any pending tasks to run before destruction. 145 // Allow any pending tasks to run before destruction.
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 size_t expected_frame_size = 4; 639 size_t expected_frame_size = 4;
640 if ((i >= media::cast::kMaxUnackedFrames + 2u) && 640 if ((i >= media::cast::kMaxUnackedFrames + 2u) &&
641 (i < media::cast::kMaxUnackedFrames + 2u + num_frames_in_data_pipe)) { 641 (i < media::cast::kMaxUnackedFrames + 2u + num_frames_in_data_pipe)) {
642 expected_frame_size = 768; 642 expected_frame_size = 768;
643 } 643 }
644 EXPECT_TRUE(ExpectCorrectFrameData(expected_frame_size, frame)); 644 EXPECT_TRUE(ExpectCorrectFrameData(expected_frame_size, frame));
645 } 645 }
646 } 646 }
647 647
648 } // namespace cast 648 } // namespace cast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698