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

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

Issue 2487373003: Disable background video track behind a feature flag (Closed)
Patch Set: Rebase + comment fix 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 "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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 void mediaSourceOpened(blink::WebMediaSource*) override {} 83 void mediaSourceOpened(blink::WebMediaSource*) override {}
84 void requestSeek(double) override {} 84 void requestSeek(double) override {}
85 void remoteRouteAvailabilityChanged( 85 void remoteRouteAvailabilityChanged(
86 blink::WebRemotePlaybackAvailability) override {} 86 blink::WebRemotePlaybackAvailability) override {}
87 void connectedToRemoteDevice() override {} 87 void connectedToRemoteDevice() override {}
88 void disconnectedFromRemoteDevice() override {} 88 void disconnectedFromRemoteDevice() override {}
89 void cancelledRemotePlaybackRequest() override {} 89 void cancelledRemotePlaybackRequest() override {}
90 void remotePlaybackStarted() override {} 90 void remotePlaybackStarted() override {}
91 bool isAutoplayingMuted() override { return is_autoplaying_muted_; } 91 bool isAutoplayingMuted() override { return is_autoplaying_muted_; }
92 void requestReload(const blink::WebURL& newUrl) override {} 92 void requestReload(const blink::WebURL& newUrl) override {}
93 bool hasSelectedVideoTrack() override { return false; }
94 blink::WebMediaPlayer::TrackId getSelectedVideoTrackId() override {
95 return blink::WebMediaPlayer::TrackId();
96 }
93 97
94 void set_is_autoplaying_muted(bool value) { is_autoplaying_muted_ = value; } 98 void set_is_autoplaying_muted(bool value) { is_autoplaying_muted_ = value; }
95 99
96 private: 100 private:
97 bool is_autoplaying_muted_ = false; 101 bool is_autoplaying_muted_ = false;
98 102
99 DISALLOW_COPY_AND_ASSIGN(DummyWebMediaPlayerClient); 103 DISALLOW_COPY_AND_ASSIGN(DummyWebMediaPlayerClient);
100 }; 104 };
101 105
102 class MockWebMediaPlayerDelegate 106 class MockWebMediaPlayerDelegate
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 EXPECT_CALL(delegate_, DidPlay(_, true, false, false, _)); 749 EXPECT_CALL(delegate_, DidPlay(_, true, false, false, _));
746 client_.set_is_autoplaying_muted(true); 750 client_.set_is_autoplaying_muted(true);
747 SetDelegateState(WebMediaPlayerImpl::DelegateState::PLAYING); 751 SetDelegateState(WebMediaPlayerImpl::DelegateState::PLAYING);
748 752
749 EXPECT_CALL(delegate_, DidPlay(_, true, true, false, _)); 753 EXPECT_CALL(delegate_, DidPlay(_, true, true, false, _));
750 client_.set_is_autoplaying_muted(false); 754 client_.set_is_autoplaying_muted(false);
751 wmpi_->setVolume(1.0); 755 wmpi_->setVolume(1.0);
752 } 756 }
753 757
754 } // namespace media 758 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | third_party/WebKit/Source/core/html/HTMLMediaElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698