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

Side by Side Diff: media/base/android/media_source_player_unittest.cc

Issue 1640123004: Propagate media session id into MediaPlayerAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-media-session-id-over-ipc
Patch Set: Fix stray kDefaultMediaSessionID Created 4 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "media/base/android/media_source_player.h" 5 #include "media/base/android/media_source_player.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 int num_browser_seek_requests_; 155 int num_browser_seek_requests_;
156 156
157 DISALLOW_COPY_AND_ASSIGN(MockDemuxerAndroid); 157 DISALLOW_COPY_AND_ASSIGN(MockDemuxerAndroid);
158 }; 158 };
159 159
160 class MediaSourcePlayerTest : public testing::Test { 160 class MediaSourcePlayerTest : public testing::Test {
161 public: 161 public:
162 MediaSourcePlayerTest() 162 MediaSourcePlayerTest()
163 : manager_(&message_loop_), 163 : manager_(&message_loop_),
164 demuxer_(new MockDemuxerAndroid(&message_loop_)), 164 demuxer_(new MockDemuxerAndroid(&message_loop_)),
165 player_(0, &manager_, 165 player_(0,
166 &manager_,
166 base::Bind(&MockMediaPlayerManager::OnDecorderResourcesReleased, 167 base::Bind(&MockMediaPlayerManager::OnDecorderResourcesReleased,
167 base::Unretained(&manager_)), 168 base::Unretained(&manager_)),
168 scoped_ptr<DemuxerAndroid>(demuxer_), 169 scoped_ptr<DemuxerAndroid>(demuxer_),
169 GURL()), 170 GURL(),
171 kDefaultMediaSessionId),
170 decoder_callback_hook_executed_(false), 172 decoder_callback_hook_executed_(false),
171 surface_texture_a_is_next_(true) {} 173 surface_texture_a_is_next_(true) {}
172 174
173 ~MediaSourcePlayerTest() override {} 175 ~MediaSourcePlayerTest() override {}
174 176
175 protected: 177 protected:
176 // Get the decoder job from the MediaSourcePlayer. The return value must not 178 // Get the decoder job from the MediaSourcePlayer. The return value must not
177 // be NULL. 179 // be NULL.
178 MediaDecoderJob* GetMediaDecoderJob(bool is_audio) { 180 MediaDecoderJob* GetMediaDecoderJob(bool is_audio) {
179 if (is_audio) { 181 if (is_audio) {
(...skipping 2202 matching lines...) Expand 10 before | Expand all | Expand 10 after
2382 2384
2383 EXPECT_EQ(demuxer_->num_data_requests(), 0); 2385 EXPECT_EQ(demuxer_->num_data_requests(), 0);
2384 player_.OnDemuxerConfigsAvailable(CreateDemuxerConfigs(true, true)); 2386 player_.OnDemuxerConfigsAvailable(CreateDemuxerConfigs(true, true));
2385 2387
2386 manager_.set_allow_play(true); 2388 manager_.set_allow_play(true);
2387 player_.Start(); 2389 player_.Start();
2388 EXPECT_TRUE(player_.IsPlaying()); 2390 EXPECT_TRUE(player_.IsPlaying());
2389 } 2391 }
2390 2392
2391 } // namespace media 2393 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_source_player.cc ('k') | third_party/WebKit/public/platform/modules/mediasession/WebMediaSession.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698