| 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 "base/test/scoped_command_line.h" | 10 #include "base/test/scoped_command_line.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 ASSERT_EQ(2u, codecs_out.size()); | 220 ASSERT_EQ(2u, codecs_out.size()); |
| 221 EXPECT_EQ("avc1.42E01E", codecs_out[0]); | 221 EXPECT_EQ("avc1.42E01E", codecs_out[0]); |
| 222 EXPECT_EQ("mp4a.40.2", codecs_out[1]); | 222 EXPECT_EQ("mp4a.40.2", codecs_out[1]); |
| 223 } | 223 } |
| 224 | 224 |
| 225 // See deeper string parsing testing in video_codecs_unittests.cc. | 225 // See deeper string parsing testing in video_codecs_unittests.cc. |
| 226 TEST(MimeUtilTest, ExperimentalMultiPartVp9) { | 226 TEST(MimeUtilTest, ExperimentalMultiPartVp9) { |
| 227 base::test::ScopedCommandLine scoped_command_line; | 227 base::test::ScopedCommandLine scoped_command_line; |
| 228 | 228 |
| 229 // Multi-part VP9 string not enabled by default. | 229 // Multi-part VP9 string not enabled by default. |
| 230 EXPECT_FALSE(IsSupportedMediaFormat("video/webm", {"vp09.00.01.08"})); | 230 EXPECT_FALSE(IsSupportedMediaFormat("video/webm", {"vp09.00.10.08"})); |
| 231 | 231 |
| 232 // Should work if enabled. | 232 // Should work if enabled. |
| 233 EnableNewVp9CodecStringSupport(); | 233 EnableNewVp9CodecStringSupport(); |
| 234 EXPECT_TRUE(IsSupportedMediaFormat("video/webm", {"vp09.00.01.08"})); | 234 EXPECT_TRUE(IsSupportedMediaFormat("video/webm", {"vp09.00.10.08"})); |
| 235 } | 235 } |
| 236 | 236 |
| 237 TEST(IsCodecSupportedOnAndroidTest, EncryptedCodecsFailWithoutPlatformSupport) { | 237 TEST(IsCodecSupportedOnAndroidTest, EncryptedCodecsFailWithoutPlatformSupport) { |
| 238 // Vary all parameters except |has_platform_decoders|. | 238 // Vary all parameters except |has_platform_decoders|. |
| 239 MimeUtil::PlatformInfo states_to_vary = VaryAllFields(); | 239 MimeUtil::PlatformInfo states_to_vary = VaryAllFields(); |
| 240 states_to_vary.has_platform_decoders = false; | 240 states_to_vary.has_platform_decoders = false; |
| 241 | 241 |
| 242 // Disable platform decoders. | 242 // Disable platform decoders. |
| 243 MimeUtil::PlatformInfo test_states; | 243 MimeUtil::PlatformInfo test_states; |
| 244 test_states.has_platform_decoders = false; | 244 test_states.has_platform_decoders = false; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 MimeUtil::MPEG2_AAC, "application/vnd.apple.mpegurl", false, info)); | 387 MimeUtil::MPEG2_AAC, "application/vnd.apple.mpegurl", false, info)); |
| 388 EXPECT_FALSE(MimeUtil::IsCodecSupportedOnAndroid( | 388 EXPECT_FALSE(MimeUtil::IsCodecSupportedOnAndroid( |
| 389 MimeUtil::MPEG2_AAC, "audio/mpegurl", false, info)); | 389 MimeUtil::MPEG2_AAC, "audio/mpegurl", false, info)); |
| 390 EXPECT_FALSE(MimeUtil::IsCodecSupportedOnAndroid( | 390 EXPECT_FALSE(MimeUtil::IsCodecSupportedOnAndroid( |
| 391 MimeUtil::MPEG2_AAC, "audio/x-mpegurl", false, info)); | 391 MimeUtil::MPEG2_AAC, "audio/x-mpegurl", false, info)); |
| 392 }); | 392 }); |
| 393 } | 393 } |
| 394 | 394 |
| 395 } // namespace internal | 395 } // namespace internal |
| 396 } // namespace media | 396 } // namespace media |
| OLD | NEW |