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

Side by Side Diff: media/mojo/clients/mojo_audio_decoder_unittest.cc

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 3 years, 12 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
« no previous file with comments | « mash/webtest/webtest.cc ('k') | media/mojo/clients/mojo_cdm_unittest.cc » ('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 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 <memory> 5 #include <memory>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 service_thread_.Start(); 53 service_thread_.Start();
54 service_task_runner_ = service_thread_.task_runner(); 54 service_task_runner_ = service_thread_.task_runner();
55 55
56 // Setup the mojo connection. 56 // Setup the mojo connection.
57 mojom::AudioDecoderPtr remote_audio_decoder; 57 mojom::AudioDecoderPtr remote_audio_decoder;
58 service_task_runner_->PostTask( 58 service_task_runner_->PostTask(
59 FROM_HERE, 59 FROM_HERE,
60 base::Bind(&MojoAudioDecoderTest::ConnectToService, 60 base::Bind(&MojoAudioDecoderTest::ConnectToService,
61 base::Unretained(this), 61 base::Unretained(this),
62 base::Passed(mojo::GetProxy(&remote_audio_decoder)))); 62 base::Passed(mojo::MakeRequest(&remote_audio_decoder))));
63 mojo_audio_decoder_.reset(new MojoAudioDecoder( 63 mojo_audio_decoder_.reset(new MojoAudioDecoder(
64 message_loop_.task_runner(), std::move(remote_audio_decoder))); 64 message_loop_.task_runner(), std::move(remote_audio_decoder)));
65 } 65 }
66 66
67 virtual ~MojoAudioDecoderTest() { 67 virtual ~MojoAudioDecoderTest() {
68 // Destroy |mojo_audio_decoder_| first so that the service will be 68 // Destroy |mojo_audio_decoder_| first so that the service will be
69 // destructed. Then stop the service thread. Otherwise we'll leak memory. 69 // destructed. Then stop the service thread. Otherwise we'll leak memory.
70 mojo_audio_decoder_.reset(); 70 mojo_audio_decoder_.reset();
71 service_thread_.Stop(); 71 service_thread_.Stop();
72 72
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 Initialize(); 216 Initialize();
217 217
218 // Choose a large number of decodes per test on purpose to expose potential 218 // Choose a large number of decodes per test on purpose to expose potential
219 // out of order delivery of mojo messages. See http://crbug.com/646054 219 // out of order delivery of mojo messages. See http://crbug.com/646054
220 DecodeMultipleTimes(100); 220 DecodeMultipleTimes(100);
221 } 221 }
222 222
223 // TODO(xhwang): Add more tests. 223 // TODO(xhwang): Add more tests.
224 224
225 } // namespace media 225 } // namespace media
OLDNEW
« no previous file with comments | « mash/webtest/webtest.cc ('k') | media/mojo/clients/mojo_cdm_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698