| 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, "") { | |
| 198 return CONTAINS_STRING(arg, "Generated splice of overlap duration " + | |
| 199 base::IntToString(duration_microseconds) + | |
| 200 "us into new buffer at " + | |
| 201 base::IntToString(time_microseconds) + "us."); | |
| 202 } | |
| 203 | |
| 204 MATCHER_P2(SkippingSpliceAtOrBefore, | 197 MATCHER_P2(SkippingSpliceAtOrBefore, |
| 205 new_microseconds, | 198 new_microseconds, |
| 206 existing_microseconds, | 199 existing_microseconds, |
| 207 "") { | 200 "") { |
| 208 return CONTAINS_STRING( | 201 return CONTAINS_STRING( |
| 209 arg, "Skipping splice frame generation: first new buffer at " + | 202 arg, "Skipping splice frame generation: first new buffer at " + |
| 210 base::IntToString(new_microseconds) + | 203 base::IntToString(new_microseconds) + |
| 211 "us begins at or before existing buffer at " + | 204 "us begins at or before existing buffer at " + |
| 212 base::IntToString(existing_microseconds) + "us."); | 205 base::IntToString(existing_microseconds) + "us."); |
| 213 } | 206 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 235 | 228 |
| 236 MATCHER(WebMOutOfOrderTimecode, "") { | 229 MATCHER(WebMOutOfOrderTimecode, "") { |
| 237 return CONTAINS_STRING( | 230 return CONTAINS_STRING( |
| 238 arg, "Got a block with a timecode before the previous block."); | 231 arg, "Got a block with a timecode before the previous block."); |
| 239 } | 232 } |
| 240 | 233 |
| 241 MATCHER(WebMClusterBeforeFirstInfo, "") { | 234 MATCHER(WebMClusterBeforeFirstInfo, "") { |
| 242 return CONTAINS_STRING(arg, "Found Cluster element before Info."); | 235 return CONTAINS_STRING(arg, "Found Cluster element before Info."); |
| 243 } | 236 } |
| 244 | 237 |
| 238 MATCHER_P3(TrimmedSpliceOverlap, |
| 239 splice_time_us, |
| 240 overlapped_start_us, |
| 241 trim_duration_us, |
| 242 "") { |
| 243 return CONTAINS_STRING( |
| 244 arg, "Audio buffer splice at PTS=" + base::IntToString(splice_time_us) + |
| 245 "us. Trimmed tail of overlapped buffer (PTS=" + |
| 246 base::IntToString(overlapped_start_us) + "us) by " + |
| 247 base::IntToString(trim_duration_us)); |
| 248 } |
| 249 |
| 245 } // namespace media | 250 } // namespace media |
| 246 | 251 |
| 247 #endif // MEDIA_BASE_TEST_HELPERS_H_ | 252 #endif // MEDIA_BASE_TEST_HELPERS_H_ |
| OLD | NEW |