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

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

Issue 1684853003: WIP: allow to play Youtube if use_proprieraty_codecs=1 and ffmpeg_branding=Chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/mime_util.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "media/base/mime_util.h" 10 #include "media/base/mime_util.h"
(...skipping 23 matching lines...) Expand all
34 bool kHlsSupported = true; 34 bool kHlsSupported = true;
35 #else 35 #else
36 bool kHlsSupported = false; 36 bool kHlsSupported = false;
37 #endif 37 #endif
38 38
39 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType("application/x-mpegurl")); 39 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType("application/x-mpegurl"));
40 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType("Application/X-MPEGURL")); 40 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType("Application/X-MPEGURL"));
41 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType( 41 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType(
42 "application/vnd.apple.mpegurl")); 42 "application/vnd.apple.mpegurl"));
43 43
44 #if defined(USE_PROPRIETARY_CODECS) 44 #if defined(USE_PROPRIETARY_CODECS) && !defined(FFMPEG_BRANDING_CHROMIUM)
45 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mp4")); 45 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mp4"));
46 EXPECT_TRUE(IsSupportedMediaMimeType("audio/x-m4a")); 46 EXPECT_TRUE(IsSupportedMediaMimeType("audio/x-m4a"));
47 EXPECT_TRUE(IsSupportedMediaMimeType("video/mp4")); 47 EXPECT_TRUE(IsSupportedMediaMimeType("video/mp4"));
48 EXPECT_TRUE(IsSupportedMediaMimeType("video/x-m4v")); 48 EXPECT_TRUE(IsSupportedMediaMimeType("video/x-m4v"));
49 49
50 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mp3")); 50 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mp3"));
51 EXPECT_TRUE(IsSupportedMediaMimeType("audio/x-mp3")); 51 EXPECT_TRUE(IsSupportedMediaMimeType("audio/x-mp3"));
52 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mpeg")); 52 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mpeg"));
53 EXPECT_TRUE(IsSupportedMediaMimeType("audio/aac")); 53 EXPECT_TRUE(IsSupportedMediaMimeType("audio/aac"));
54 54
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 // Test without stripping the codec type. 106 // Test without stripping the codec type.
107 std::vector<std::string> codecs_out; 107 std::vector<std::string> codecs_out;
108 ParseCodecString("avc1.42E01E, mp4a.40.2", &codecs_out, false); 108 ParseCodecString("avc1.42E01E, mp4a.40.2", &codecs_out, false);
109 ASSERT_EQ(2u, codecs_out.size()); 109 ASSERT_EQ(2u, codecs_out.size());
110 EXPECT_EQ("avc1.42E01E", codecs_out[0]); 110 EXPECT_EQ("avc1.42E01E", codecs_out[0]);
111 EXPECT_EQ("mp4a.40.2", codecs_out[1]); 111 EXPECT_EQ("mp4a.40.2", codecs_out[1]);
112 } 112 }
113 113
114 } // namespace media 114 } // namespace media
OLDNEW
« no previous file with comments | « media/base/mime_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698