| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // TODO(sandersd): Refactor to remove recomputed codec arrays, and generally | 5 // TODO(sandersd): Refactor to remove recomputed codec arrays, and generally |
| 6 // shorten and improve coverage. | 6 // shorten and improve coverage. |
| 7 // - http://crbug.com/417444 | 7 // - http://crbug.com/417444 |
| 8 // - http://crbug.com/457438 | 8 // - http://crbug.com/457438 |
| 9 // TODO(sandersd): Add tests to cover codec vectors with empty items. | 9 // TODO(sandersd): Add tests to cover codec vectors with empty items. |
| 10 // http://crbug.com/417461 | 10 // http://crbug.com/417461 |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 TEST_F(KeySystemsTest, Basic_UnrecognizedKeySystem) { | 381 TEST_F(KeySystemsTest, Basic_UnrecognizedKeySystem) { |
| 382 static const char* const kUnrecognized = "x-org.example.unrecognized"; | 382 static const char* const kUnrecognized = "x-org.example.unrecognized"; |
| 383 | 383 |
| 384 EXPECT_FALSE(IsSupportedKeySystem(kUnrecognized)); | 384 EXPECT_FALSE(IsSupportedKeySystem(kUnrecognized)); |
| 385 | 385 |
| 386 EXPECT_EQ("Unknown", GetKeySystemNameForUMA(kUnrecognized)); | 386 EXPECT_EQ("Unknown", GetKeySystemNameForUMA(kUnrecognized)); |
| 387 EXPECT_FALSE(CanUseAesDecryptor(kUnrecognized)); | 387 EXPECT_FALSE(CanUseAesDecryptor(kUnrecognized)); |
| 388 | 388 |
| 389 #if defined(ENABLE_PEPPER_CDMS) | 389 #if defined(ENABLE_PEPPER_CDMS) |
| 390 std::string type; | 390 std::string type; |
| 391 EXPECT_DEBUG_DEATH( | 391 EXPECT_DEBUG_DEATH(type = GetPepperType(kUnrecognized), |
| 392 type = GetPepperType(kUnrecognized), | 392 "x-org.example.unrecognized is not a known system"); |
| 393 "x-org.example.unrecognized is not a known concrete system"); | |
| 394 EXPECT_TRUE(type.empty()); | 393 EXPECT_TRUE(type.empty()); |
| 395 #endif | 394 #endif |
| 396 } | 395 } |
| 397 | 396 |
| 398 TEST_F(KeySystemsTest, Basic_UsesAesDecryptor) { | 397 TEST_F(KeySystemsTest, Basic_UsesAesDecryptor) { |
| 399 EXPECT_TRUE(IsSupportedKeySystem(kUsesAes)); | 398 EXPECT_TRUE(IsSupportedKeySystem(kUsesAes)); |
| 400 EXPECT_TRUE(IsSupportedKeySystemWithMediaMimeType( | 399 EXPECT_TRUE(IsSupportedKeySystemWithMediaMimeType( |
| 401 kVideoWebM, no_codecs(), kUsesAes)); | 400 kVideoWebM, no_codecs(), kUsesAes)); |
| 402 | 401 |
| 403 // No UMA value for this test key system. | 402 // No UMA value for this test key system. |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.something.else")); | 717 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.something.else")); |
| 719 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.other")); | 718 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.other")); |
| 720 | 719 |
| 721 EXPECT_FALSE(IsSupportedKeySystem("x-")); | 720 EXPECT_FALSE(IsSupportedKeySystem("x-")); |
| 722 EXPECT_TRUE(IsSupportedKeySystem("x-something")); | 721 EXPECT_TRUE(IsSupportedKeySystem("x-something")); |
| 723 EXPECT_FALSE(IsSupportedKeySystem("x-something.else")); | 722 EXPECT_FALSE(IsSupportedKeySystem("x-something.else")); |
| 724 EXPECT_FALSE(IsSupportedKeySystem("x-other")); | 723 EXPECT_FALSE(IsSupportedKeySystem("x-other")); |
| 725 } | 724 } |
| 726 | 725 |
| 727 } // namespace media | 726 } // namespace media |
| OLD | NEW |