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

Side by Side Diff: media/cast/video_receiver/video_decoder_unittest.cc

Issue 116623002: Cast: Adding support for GPU accelerated encode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed dependency on content Created 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/test/simple_test_tick_clock.h" 7 #include "base/test/simple_test_tick_clock.h"
8 #include "base/time/tick_clock.h" 8 #include "base/time/tick_clock.h"
9 #include "media/cast/cast_config.h" 9 #include "media/cast/cast_config.h"
10 #include "media/cast/cast_defines.h" 10 #include "media/cast/cast_defines.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 EncodedVideoFrame encoded_frame; 69 EncodedVideoFrame encoded_frame;
70 base::TimeTicks render_time; 70 base::TimeTicks render_time;
71 encoded_frame.codec = kVp8; 71 encoded_frame.codec = kVp8;
72 EXPECT_DEATH( 72 EXPECT_DEATH(
73 decoder_->DecodeVideoFrame( 73 decoder_->DecodeVideoFrame(
74 &encoded_frame, render_time, 74 &encoded_frame, render_time,
75 base::Bind(&DecodeTestFrameCallback::DecodeComplete, test_callback_)), 75 base::Bind(&DecodeTestFrameCallback::DecodeComplete, test_callback_)),
76 "Empty frame"); 76 "Empty frame");
77 } 77 }
78 78
79 // TODO(pwestin): EXPECT_DEATH tests can not pass valgrind.
80 TEST_F(VideoDecoderTest, DISABLED_InvalidCodec) {
81 EncodedVideoFrame encoded_frame;
82 base::TimeTicks render_time;
83 encoded_frame.data.assign(kFrameSize, 0);
84 encoded_frame.codec = kExternalVideo;
85 EXPECT_DEATH(
86 decoder_->DecodeVideoFrame(&encoded_frame, render_time, base::Bind(
87 &DecodeTestFrameCallback::DecodeComplete, test_callback_)),
88 "Invalid codec");
89 }
90
91 // TODO(pwestin): Test decoding a real frame. 79 // TODO(pwestin): Test decoding a real frame.
92 80
93 } // namespace cast 81 } // namespace cast
94 } // namespace media 82 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698