OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef MEDIA_BASE_TEST_HELPERS_H_ | 5 #ifndef MEDIA_BASE_TEST_HELPERS_H_ |
6 #define MEDIA_BASE_TEST_HELPERS_H_ | 6 #define MEDIA_BASE_TEST_HELPERS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
187 MATCHER_P(InitSegmentMissesExpectedTrack, missing_codec, "") { | 187 MATCHER_P(InitSegmentMissesExpectedTrack, missing_codec, "") { |
188 return CONTAINS_STRING(arg, "Initialization segment misses expected " + | 188 return CONTAINS_STRING(arg, "Initialization segment misses expected " + |
189 std::string(missing_codec) + " track."); | 189 std::string(missing_codec) + " track."); |
190 } | 190 } |
191 | 191 |
192 MATCHER_P2(UnexpectedTrack, track_type, id, "") { | 192 MATCHER_P2(UnexpectedTrack, track_type, id, "") { |
193 return CONTAINS_STRING(arg, std::string("Got unexpected ") + track_type + | 193 return CONTAINS_STRING(arg, std::string("Got unexpected ") + track_type + |
194 " track track_id=" + id); | 194 " track track_id=" + id); |
195 } | 195 } |
196 | 196 |
197 MATCHER_P2(GeneratedSplice, duration_microseconds, time_microseconds, "") { | 197 MATCHER_P2(GeneratedSplice, duration_microseconds, time_microseconds, "") { |
wolenetz
2016/10/28 23:08:19
This was relocated here from tests in the interim.
chcunningham
2016/11/02 01:28:42
Done. Nice catch
| |
198 return CONTAINS_STRING(arg, "Generated splice of overlap duration " + | 198 return CONTAINS_STRING(arg, "Generated splice of overlap duration " + |
199 base::IntToString(duration_microseconds) + | 199 base::IntToString(duration_microseconds) + |
200 "us into new buffer at " + | 200 "us into new buffer at " + |
201 base::IntToString(time_microseconds) + "us."); | 201 base::IntToString(time_microseconds) + "us."); |
202 } | 202 } |
203 | 203 |
204 MATCHER_P2(SkippingSpliceAtOrBefore, | 204 MATCHER_P2(SkippingSpliceAtOrBefore, |
205 new_microseconds, | 205 new_microseconds, |
206 existing_microseconds, | 206 existing_microseconds, |
207 "") { | 207 "") { |
(...skipping 27 matching lines...) Expand all Loading... | |
235 | 235 |
236 MATCHER(WebMOutOfOrderTimecode, "") { | 236 MATCHER(WebMOutOfOrderTimecode, "") { |
237 return CONTAINS_STRING( | 237 return CONTAINS_STRING( |
238 arg, "Got a block with a timecode before the previous block."); | 238 arg, "Got a block with a timecode before the previous block."); |
239 } | 239 } |
240 | 240 |
241 MATCHER(WebMClusterBeforeFirstInfo, "") { | 241 MATCHER(WebMClusterBeforeFirstInfo, "") { |
242 return CONTAINS_STRING(arg, "Found Cluster element before Info."); | 242 return CONTAINS_STRING(arg, "Found Cluster element before Info."); |
243 } | 243 } |
244 | 244 |
245 MATCHER_P3(TrimmedSpliceOverlap, | |
246 splice_time_us, | |
247 overlapped_start_us, | |
248 trim_duration_us, | |
249 "") { | |
250 return CONTAINS_STRING( | |
251 arg, "Audio buffer splice at PTS=" + base::IntToString(splice_time_us) + | |
252 "us. Trimmed tail of overlapped buffer (PTS=" + | |
253 base::IntToString(overlapped_start_us) + "us) by " + | |
254 base::IntToString(trim_duration_us)); | |
255 } | |
256 | |
245 } // namespace media | 257 } // namespace media |
246 | 258 |
247 #endif // MEDIA_BASE_TEST_HELPERS_H_ | 259 #endif // MEDIA_BASE_TEST_HELPERS_H_ |
OLD | NEW |