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

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

Issue 2389473002: Media Remoting: Add RemotingController. (Closed)
Patch Set: Rebased. Created 4 years, 2 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') | media/blink/webmediaplayer_params.h » ('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 "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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 wmpi_.reset(new WebMediaPlayerImpl( 131 wmpi_.reset(new WebMediaPlayerImpl(
132 web_local_frame_, &client_, nullptr, delegate, 132 web_local_frame_, &client_, nullptr, delegate,
133 base::MakeUnique<DefaultRendererFactory>( 133 base::MakeUnique<DefaultRendererFactory>(
134 media_log_, nullptr, DefaultRendererFactory::GetGpuFactoriesCB()), 134 media_log_, nullptr, DefaultRendererFactory::GetGpuFactoriesCB()),
135 url_index_, 135 url_index_,
136 WebMediaPlayerParams( 136 WebMediaPlayerParams(
137 WebMediaPlayerParams::DeferLoadCB(), 137 WebMediaPlayerParams::DeferLoadCB(),
138 scoped_refptr<SwitchableAudioRendererSink>(), media_log_, 138 scoped_refptr<SwitchableAudioRendererSink>(), media_log_,
139 media_thread_.task_runner(), message_loop_.task_runner(), 139 media_thread_.task_runner(), message_loop_.task_runner(),
140 message_loop_.task_runner(), WebMediaPlayerParams::Context3DCB(), 140 message_loop_.task_runner(), WebMediaPlayerParams::Context3DCB(),
141 base::Bind(&OnAdjustAllocatedMemory), nullptr, nullptr))); 141 base::Bind(&OnAdjustAllocatedMemory), nullptr, nullptr, nullptr)));
142 } 142 }
143 143
144 ~WebMediaPlayerImplTest() override { 144 ~WebMediaPlayerImplTest() override {
145 // Destruct WebMediaPlayerImpl and pump the message loop to ensure that 145 // Destruct WebMediaPlayerImpl and pump the message loop to ensure that
146 // objects passed to the message loop for destruction are released. 146 // objects passed to the message loop for destruction are released.
147 // 147 //
148 // NOTE: This should be done before any other member variables are 148 // NOTE: This should be done before any other member variables are
149 // destructed since WMPI may reference them during destruction. 149 // destructed since WMPI may reference them during destruction.
150 wmpi_.reset(); 150 wmpi_.reset();
151 base::RunLoop().RunUntilIdle(); 151 base::RunLoop().RunUntilIdle();
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 EXPECT_CALL(delegate_, IsPlayingBackgroundVideo()).WillOnce(Return(false)); 647 EXPECT_CALL(delegate_, IsPlayingBackgroundVideo()).WillOnce(Return(false));
648 EXPECT_CALL(delegate_, IsHidden()).WillRepeatedly(Return(true)); 648 EXPECT_CALL(delegate_, IsHidden()).WillRepeatedly(Return(true));
649 649
650 state = ComputeBackgroundedPlayState(); 650 state = ComputeBackgroundedPlayState();
651 EXPECT_EQ(WebMediaPlayerImpl::DelegateState::PAUSED, state.delegate_state); 651 EXPECT_EQ(WebMediaPlayerImpl::DelegateState::PAUSED, state.delegate_state);
652 EXPECT_FALSE(state.is_memory_reporting_enabled); 652 EXPECT_FALSE(state.is_memory_reporting_enabled);
653 EXPECT_TRUE(state.is_suspended); 653 EXPECT_TRUE(state.is_suspended);
654 } 654 }
655 655
656 } // namespace media 656 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | media/blink/webmediaplayer_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698