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

Side by Side Diff: media/base/container_names_unittest.cc

Issue 2797133009: Better detection of MP4 files (Closed)
Patch Set: Created 3 years, 8 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/base/container_names.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "media/base/container_names.h" 8 #include "media/base/container_names.h"
9 #include "media/base/test_data_util.h" 9 #include "media/base/test_data_util.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 TestFile(CONTAINER_OGG, GetTestDataFilePath("9ch.ogg")); 153 TestFile(CONTAINER_OGG, GetTestDataFilePath("9ch.ogg"));
154 } 154 }
155 155
156 TEST(ContainerNamesTest, FileCheckWAV) { 156 TEST(ContainerNamesTest, FileCheckWAV) {
157 TestFile(CONTAINER_WAV, GetTestDataFilePath("4ch.wav")); 157 TestFile(CONTAINER_WAV, GetTestDataFilePath("4ch.wav"));
158 TestFile(CONTAINER_WAV, GetTestDataFilePath("sfx_f32le.wav")); 158 TestFile(CONTAINER_WAV, GetTestDataFilePath("sfx_f32le.wav"));
159 TestFile(CONTAINER_WAV, GetTestDataFilePath("sfx_s16le.wav")); 159 TestFile(CONTAINER_WAV, GetTestDataFilePath("sfx_s16le.wav"));
160 } 160 }
161 161
162 TEST(ContainerNamesTest, FileCheckMOV) { 162 TEST(ContainerNamesTest, FileCheckMOV) {
163 TestFile(CONTAINER_MOV, GetTestDataFilePath("bear_rotate_90.mp4"));
163 TestFile(CONTAINER_MOV, GetTestDataFilePath("bear-1280x720.mp4")); 164 TestFile(CONTAINER_MOV, GetTestDataFilePath("bear-1280x720.mp4"));
165 TestFile(CONTAINER_MOV, GetTestDataFilePath("crbug657437.mp4"));
164 TestFile(CONTAINER_MOV, GetTestDataFilePath("sfx.m4a")); 166 TestFile(CONTAINER_MOV, GetTestDataFilePath("sfx.m4a"));
165 } 167 }
166 168
167 TEST(ContainerNamesTest, FileCheckWEBM) { 169 TEST(ContainerNamesTest, FileCheckWEBM) {
168 TestFile(CONTAINER_WEBM, GetTestDataFilePath("bear-320x240.webm")); 170 TestFile(CONTAINER_WEBM, GetTestDataFilePath("bear-320x240.webm"));
169 TestFile(CONTAINER_WEBM, GetTestDataFilePath("no_streams.webm")); 171 TestFile(CONTAINER_WEBM, GetTestDataFilePath("no_streams.webm"));
170 TestFile(CONTAINER_WEBM, GetTestDataFilePath("webm_ebml_element")); 172 TestFile(CONTAINER_WEBM, GetTestDataFilePath("webm_ebml_element"));
171 } 173 }
172 174
173 TEST(ContainerNamesTest, FileCheckMP3) { 175 TEST(ContainerNamesTest, FileCheckMP3) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 TestFile(CONTAINER_UNKNOWN, GetTestDataFilePath("ten_byte_file")); 242 TestFile(CONTAINER_UNKNOWN, GetTestDataFilePath("ten_byte_file"));
241 TestFile(CONTAINER_UNKNOWN, GetTestDataFilePath("README")); 243 TestFile(CONTAINER_UNKNOWN, GetTestDataFilePath("README"));
242 TestFile(CONTAINER_UNKNOWN, GetTestDataFilePath("bali_640x360_P422.yuv")); 244 TestFile(CONTAINER_UNKNOWN, GetTestDataFilePath("bali_640x360_P422.yuv"));
243 TestFile(CONTAINER_UNKNOWN, GetTestDataFilePath("bali_640x360_RGB24.rgb")); 245 TestFile(CONTAINER_UNKNOWN, GetTestDataFilePath("bali_640x360_RGB24.rgb"));
244 TestFile(CONTAINER_UNKNOWN, GetTestDataFilePath("webm_vp8_track_entry")); 246 TestFile(CONTAINER_UNKNOWN, GetTestDataFilePath("webm_vp8_track_entry"));
245 } 247 }
246 248
247 } // namespace container_names 249 } // namespace container_names
248 250
249 } // namespace media 251 } // namespace media
OLDNEW
« no previous file with comments | « media/base/container_names.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698