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

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

Issue 2796193002: fix canplaythrough (Closed)
Patch Set: kSpecCompliantCanPlayThrough Created 3 years, 7 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 247 }
248 248
249 protected: 249 protected:
250 void SetReadyState(blink::WebMediaPlayer::ReadyState state) { 250 void SetReadyState(blink::WebMediaPlayer::ReadyState state) {
251 wmpi_->SetReadyState(state); 251 wmpi_->SetReadyState(state);
252 } 252 }
253 253
254 void SetPaused(bool is_paused) { wmpi_->paused_ = is_paused; } 254 void SetPaused(bool is_paused) { wmpi_->paused_ = is_paused; }
255 void SetSeeking(bool is_seeking) { wmpi_->seeking_ = is_seeking; } 255 void SetSeeking(bool is_seeking) { wmpi_->seeking_ = is_seeking; }
256 void SetEnded(bool is_ended) { wmpi_->ended_ = is_ended; } 256 void SetEnded(bool is_ended) { wmpi_->ended_ = is_ended; }
257 void SetTickClock(base::TickClock* clock) { wmpi_->tick_clock_.reset(clock); } 257 void SetTickClock(base::TickClock* clock) {
258 wmpi_->SetTickClockForTest(clock);
259 }
258 260
259 void SetFullscreen(bool is_fullscreen) { 261 void SetFullscreen(bool is_fullscreen) {
260 wmpi_->overlay_enabled_ = is_fullscreen; 262 wmpi_->overlay_enabled_ = is_fullscreen;
261 } 263 }
262 264
263 void SetMetadata(bool has_audio, bool has_video) { 265 void SetMetadata(bool has_audio, bool has_video) {
264 wmpi_->SetNetworkState(blink::WebMediaPlayer::kNetworkStateLoaded); 266 wmpi_->SetNetworkState(blink::WebMediaPlayer::kNetworkStateLoaded);
265 wmpi_->SetReadyState(blink::WebMediaPlayer::kReadyStateHaveMetadata); 267 wmpi_->SetReadyState(blink::WebMediaPlayer::kReadyStateHaveMetadata);
266 wmpi_->pipeline_metadata_.has_audio = has_audio; 268 wmpi_->pipeline_metadata_.has_audio = has_audio;
267 wmpi_->pipeline_metadata_.has_video = has_video; 269 wmpi_->pipeline_metadata_.has_video = has_video;
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 WebMediaPlayerImplBackgroundBehaviorTest, 988 WebMediaPlayerImplBackgroundBehaviorTest,
987 ::testing::Combine(::testing::Bool(), 989 ::testing::Combine(::testing::Bool(),
988 ::testing::Bool(), 990 ::testing::Bool(),
989 ::testing::Values(5, 300), 991 ::testing::Values(5, 300),
990 ::testing::Values(5, 100), 992 ::testing::Values(5, 100),
991 ::testing::Bool(), 993 ::testing::Bool(),
992 ::testing::Bool(), 994 ::testing::Bool(),
993 ::testing::Bool())); 995 ::testing::Bool()));
994 996
995 } // namespace media 997 } // 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