| 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 #include <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 const char kSuccessResult[] = "success"; | 65 const char kSuccessResult[] = "success"; |
| 66 const char kUnsupportedResult[] = "Unsupported keySystem"; | 66 const char kUnsupportedResult[] = "Unsupported keySystem"; |
| 67 const char kNoMatchResult[] = | 67 const char kNoMatchResult[] = |
| 68 "None of the requested configurations were supported."; | 68 "None of the requested configurations were supported."; |
| 69 const char kUnexpectedResult[] = "unexpected result"; | 69 const char kUnexpectedResult[] = "unexpected result"; |
| 70 | 70 |
| 71 #define EXPECT_SUCCESS(test) EXPECT_EQ(kSuccessResult, test) | 71 #define EXPECT_SUCCESS(test) EXPECT_EQ(kSuccessResult, test) |
| 72 #define EXPECT_UNKNOWN_KEYSYSTEM(test) EXPECT_EQ(kUnsupportedResult, test) | 72 #define EXPECT_UNKNOWN_KEYSYSTEM(test) EXPECT_EQ(kUnsupportedResult, test) |
| 73 #define EXPECT_NO_MATCH(test) EXPECT_EQ(kNoMatchResult, test) | 73 #define EXPECT_NO_MATCH(test) EXPECT_EQ(kNoMatchResult, test) |
| 74 | 74 |
| 75 #if BUILDFLAG(USE_PROPRIETARY_CODECS) | 75 #if defined(USE_PROPRIETARY_CODECS) |
| 76 #define EXPECT_PROPRIETARY EXPECT_SUCCESS | 76 #define EXPECT_PROPRIETARY EXPECT_SUCCESS |
| 77 #else | 77 #else |
| 78 #define EXPECT_PROPRIETARY EXPECT_NO_MATCH | 78 #define EXPECT_PROPRIETARY EXPECT_NO_MATCH |
| 79 #endif | 79 #endif |
| 80 | 80 |
| 81 // Expectations for External Clear Key. | 81 // Expectations for External Clear Key. |
| 82 #if BUILDFLAG(ENABLE_PEPPER_CDMS) | 82 #if BUILDFLAG(ENABLE_PEPPER_CDMS) |
| 83 #define EXPECT_ECK EXPECT_SUCCESS | 83 #define EXPECT_ECK EXPECT_SUCCESS |
| 84 #define EXPECT_ECK_PROPRIETARY EXPECT_PROPRIETARY | 84 #define EXPECT_ECK_PROPRIETARY EXPECT_PROPRIETARY |
| 85 #define EXPECT_ECK_NO_MATCH EXPECT_NO_MATCH | 85 #define EXPECT_ECK_NO_MATCH EXPECT_NO_MATCH |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 kVideoWebMMimeType, no_codecs(), kWidevine)); | 743 kVideoWebMMimeType, no_codecs(), kWidevine)); |
| 744 | 744 |
| 745 // Clear Key should still be registered. | 745 // Clear Key should still be registered. |
| 746 EXPECT_SUCCESS(AreCodecsSupportedByKeySystem( | 746 EXPECT_SUCCESS(AreCodecsSupportedByKeySystem( |
| 747 kVideoWebMMimeType, no_codecs(), kClearKey)); | 747 kVideoWebMMimeType, no_codecs(), kClearKey)); |
| 748 } | 748 } |
| 749 #endif // !defined(WIDEVINE_CDM_AVAILABLE) | 749 #endif // !defined(WIDEVINE_CDM_AVAILABLE) |
| 750 #endif // BUILDFLAG(ENABLE_PEPPER_CDMS) | 750 #endif // BUILDFLAG(ENABLE_PEPPER_CDMS) |
| 751 | 751 |
| 752 } // namespace chrome | 752 } // namespace chrome |
| OLD | NEW |