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

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

Issue 2651583007: Plumbing blink::Interface{Provider|Registry} through WebLocalFrame's constructor. (Closed)
Patch Set: Rebasing... Created 3 years, 10 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 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 }; 181 };
182 182
183 class WebMediaPlayerImplTest : public testing::Test { 183 class WebMediaPlayerImplTest : public testing::Test {
184 public: 184 public:
185 WebMediaPlayerImplTest() 185 WebMediaPlayerImplTest()
186 : media_thread_("MediaThreadForTest"), 186 : media_thread_("MediaThreadForTest"),
187 web_view_(blink::WebView::create(nullptr, 187 web_view_(blink::WebView::create(nullptr,
188 blink::WebPageVisibilityStateVisible)), 188 blink::WebPageVisibilityStateVisible)),
189 web_local_frame_( 189 web_local_frame_(
190 blink::WebLocalFrame::create(blink::WebTreeScopeType::Document, 190 blink::WebLocalFrame::create(blink::WebTreeScopeType::Document,
191 &web_frame_client_)), 191 &web_frame_client_,
192 nullptr,
193 nullptr)),
192 media_log_(new MediaLog()), 194 media_log_(new MediaLog()),
193 audio_parameters_(TestAudioParameters::Normal()) { 195 audio_parameters_(TestAudioParameters::Normal()) {
194 web_view_->setMainFrame(web_local_frame_); 196 web_view_->setMainFrame(web_local_frame_);
195 media_thread_.StartAndWaitForTesting(); 197 media_thread_.StartAndWaitForTesting();
196 } 198 }
197 199
198 void InitializeWebMediaPlayerImpl() { 200 void InitializeWebMediaPlayerImpl() {
199 wmpi_.reset(new WebMediaPlayerImpl( 201 wmpi_.reset(new WebMediaPlayerImpl(
200 web_local_frame_, &client_, nullptr, &delegate_, 202 web_local_frame_, &client_, nullptr, &delegate_,
201 base::MakeUnique<DefaultRendererFactory>( 203 base::MakeUnique<DefaultRendererFactory>(
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 773
772 // Average keyframe distance is too big. 774 // Average keyframe distance is too big.
773 SetVideoKeyframeDistanceAverage(base::TimeDelta::FromSeconds(100)); 775 SetVideoKeyframeDistanceAverage(base::TimeDelta::FromSeconds(100));
774 SetDuration(base::TimeDelta::FromSeconds(300)); 776 SetDuration(base::TimeDelta::FromSeconds(300));
775 EXPECT_FALSE(IsBackgroundOptimizationCandidate()); 777 EXPECT_FALSE(IsBackgroundOptimizationCandidate());
776 EXPECT_FALSE(ShouldPauseVideoWhenHidden()); 778 EXPECT_FALSE(ShouldPauseVideoWhenHidden());
777 EXPECT_FALSE(ShouldDisableVideoWhenHidden()); 779 EXPECT_FALSE(ShouldDisableVideoWhenHidden());
778 } 780 }
779 781
780 } // namespace media 782 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/resource_multibuffer_data_provider_unittest.cc ('k') | third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698