OLD | NEW |
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 "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 EXPECT_TRUE(IsSupportedMediaMimeType("audio/x-wav")); | 124 EXPECT_TRUE(IsSupportedMediaMimeType("audio/x-wav")); |
125 | 125 |
126 EXPECT_TRUE(IsSupportedMediaMimeType("audio/ogg")); | 126 EXPECT_TRUE(IsSupportedMediaMimeType("audio/ogg")); |
127 EXPECT_TRUE(IsSupportedMediaMimeType("application/ogg")); | 127 EXPECT_TRUE(IsSupportedMediaMimeType("application/ogg")); |
128 #if defined(OS_ANDROID) | 128 #if defined(OS_ANDROID) |
129 EXPECT_FALSE(IsSupportedMediaMimeType("video/ogg")); | 129 EXPECT_FALSE(IsSupportedMediaMimeType("video/ogg")); |
130 #else | 130 #else |
131 EXPECT_TRUE(IsSupportedMediaMimeType("video/ogg")); | 131 EXPECT_TRUE(IsSupportedMediaMimeType("video/ogg")); |
132 #endif // OS_ANDROID | 132 #endif // OS_ANDROID |
133 | 133 |
134 #if defined(OS_ANDROID) | 134 #if defined(OS_ANDROID) && defined(USE_PROPRIETARY_CODECS) |
135 // HLS is supported on Android API level 14 and higher and Chrome supports | 135 // HLS is supported on Android API level 14 and higher and Chrome supports |
136 // API levels 15 and higher, so these are expected to be supported. | 136 // API levels 15 and higher, so these are expected to be supported. |
137 bool kHlsSupported = true; | 137 bool kHlsSupported = true; |
138 #else | 138 #else |
139 bool kHlsSupported = false; | 139 bool kHlsSupported = false; |
140 #endif | 140 #endif |
141 | 141 |
142 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType("application/x-mpegurl")); | 142 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType("application/x-mpegurl")); |
143 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType("Application/X-MPEGURL")); | 143 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType("Application/X-MPEGURL")); |
144 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType( | 144 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType( |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 states_to_vary, test_states, | 394 states_to_vary, test_states, |
395 [](const MimeUtil::PlatformInfo& info, MimeUtil::Codec codec) { | 395 [](const MimeUtil::PlatformInfo& info, MimeUtil::Codec codec) { |
396 EXPECT_EQ(info.is_unified_media_pipeline_enabled, | 396 EXPECT_EQ(info.is_unified_media_pipeline_enabled, |
397 MimeUtil::IsCodecSupportedOnPlatform( | 397 MimeUtil::IsCodecSupportedOnPlatform( |
398 MimeUtil::OPUS, "audio/ogg", false, info)); | 398 MimeUtil::OPUS, "audio/ogg", false, info)); |
399 }); | 399 }); |
400 } | 400 } |
401 | 401 |
402 } // namespace internal | 402 } // namespace internal |
403 } // namespace media | 403 } // namespace media |
OLD | NEW |