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

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

Issue 495353003: Move WebMediaPlayerImpl and its dependencies to media/blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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/video_frame_compositor.cc ('k') | media/blink/webaudiosourceprovider_impl.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "cc/layers/video_frame_provider.h" 6 #include "cc/layers/video_frame_provider.h"
7 #include "content/renderer/media/video_frame_compositor.h"
8 #include "media/base/video_frame.h" 7 #include "media/base/video_frame.h"
8 #include "media/blink/video_frame_compositor.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace content { 11 namespace media {
12
13 using media::VideoFrame;
14 12
15 class VideoFrameCompositorTest : public testing::Test, 13 class VideoFrameCompositorTest : public testing::Test,
16 public cc::VideoFrameProvider::Client { 14 public cc::VideoFrameProvider::Client {
17 public: 15 public:
18 VideoFrameCompositorTest() 16 VideoFrameCompositorTest()
19 : compositor_(new VideoFrameCompositor( 17 : compositor_(new VideoFrameCompositor(
20 base::Bind(&VideoFrameCompositorTest::NaturalSizeChanged, 18 base::Bind(&VideoFrameCompositorTest::NaturalSizeChanged,
21 base::Unretained(this)), 19 base::Unretained(this)),
22 base::Bind(&VideoFrameCompositorTest::OpacityChanged, 20 base::Bind(&VideoFrameCompositorTest::OpacityChanged,
23 base::Unretained(this)))), 21 base::Unretained(this)))),
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 compositor()->UpdateCurrentFrame(opaque_frame); 150 compositor()->UpdateCurrentFrame(opaque_frame);
153 EXPECT_TRUE(opaque()); 151 EXPECT_TRUE(opaque());
154 EXPECT_EQ(2, opacity_changed_count()); 152 EXPECT_EQ(2, opacity_changed_count());
155 153
156 // Callback shouldn't be first subsequent times with same opaqueness. 154 // Callback shouldn't be first subsequent times with same opaqueness.
157 compositor()->UpdateCurrentFrame(opaque_frame); 155 compositor()->UpdateCurrentFrame(opaque_frame);
158 EXPECT_TRUE(opaque()); 156 EXPECT_TRUE(opaque());
159 EXPECT_EQ(2, opacity_changed_count()); 157 EXPECT_EQ(2, opacity_changed_count());
160 } 158 }
161 159
162 } // namespace content 160 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/video_frame_compositor.cc ('k') | media/blink/webaudiosourceprovider_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698