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

Side by Side Diff: media/blink/webmediaplayer_impl_unittest.cc

Issue 2141293002: [Cast for ATV] Enable UMP on Cast for ATV (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests Created 4 years, 5 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 | « media/blink/webmediaplayer_impl.cc ('k') | no next file » | 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 "media/blink/webmediaplayer_impl.h" 5 #include "media/blink/webmediaplayer_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 126
127 protected: 127 protected:
128 void SetReadyState(blink::WebMediaPlayer::ReadyState state) { 128 void SetReadyState(blink::WebMediaPlayer::ReadyState state) {
129 wmpi_->SetReadyState(state); 129 wmpi_->SetReadyState(state);
130 } 130 }
131 131
132 void SetPaused(bool is_paused) { wmpi_->paused_ = is_paused; } 132 void SetPaused(bool is_paused) { wmpi_->paused_ = is_paused; }
133 void SetSeeking(bool is_seeking) { wmpi_->seeking_ = is_seeking; } 133 void SetSeeking(bool is_seeking) { wmpi_->seeking_ = is_seeking; }
134 void SetEnded(bool is_ended) { wmpi_->ended_ = is_ended; } 134 void SetEnded(bool is_ended) { wmpi_->ended_ = is_ended; }
135 void SetFullscreen(bool is_fullscreen) { wmpi_->fullscreen_ = is_fullscreen; } 135
136 void SetFullscreen(bool is_fullscreen) {
137 wmpi_->overlay_enabled_ = is_fullscreen;
138 }
136 139
137 void SetMetadata(bool has_audio, bool has_video) { 140 void SetMetadata(bool has_audio, bool has_video) {
138 wmpi_->SetNetworkState(blink::WebMediaPlayer::NetworkStateLoaded); 141 wmpi_->SetNetworkState(blink::WebMediaPlayer::NetworkStateLoaded);
139 wmpi_->SetReadyState(blink::WebMediaPlayer::ReadyStateHaveMetadata); 142 wmpi_->SetReadyState(blink::WebMediaPlayer::ReadyStateHaveMetadata);
140 wmpi_->pipeline_metadata_.has_audio = has_audio; 143 wmpi_->pipeline_metadata_.has_audio = has_audio;
141 wmpi_->pipeline_metadata_.has_video = has_video; 144 wmpi_->pipeline_metadata_.has_video = has_video;
142 } 145 }
143 146
144 WebMediaPlayerImpl::PlayState ComputePlayState() { 147 WebMediaPlayerImpl::PlayState ComputePlayState() {
145 wmpi_->is_idle_ = false; 148 wmpi_->is_idle_ = false;
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 EXPECT_FALSE(state.is_suspended); 462 EXPECT_FALSE(state.is_suspended);
460 463
461 SetPaused(false); 464 SetPaused(false);
462 state = ComputePlayStateSuspended(); 465 state = ComputePlayStateSuspended();
463 EXPECT_EQ(WebMediaPlayerImpl::DelegateState::PLAYING, state.delegate_state); 466 EXPECT_EQ(WebMediaPlayerImpl::DelegateState::PLAYING, state.delegate_state);
464 EXPECT_TRUE(state.is_memory_reporting_enabled); 467 EXPECT_TRUE(state.is_memory_reporting_enabled);
465 EXPECT_FALSE(state.is_suspended); 468 EXPECT_FALSE(state.is_suspended);
466 } 469 }
467 470
468 } // namespace media 471 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698