| 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 <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "content/public/common/content_client.h" | 8 #include "content/public/common/content_client.h" |
| 9 #include "content/public/renderer/content_renderer_client.h" | 9 #include "content/public/renderer/content_renderer_client.h" |
| 10 #include "content/renderer/media/crypto/key_systems.h" | 10 #include "content/renderer/media/crypto/key_systems.h" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 // The TestContentClient is not available inside Death Tests on some | 157 // The TestContentClient is not available inside Death Tests on some |
| 158 // platforms (see below). Therefore, always provide a TestContentClient. | 158 // platforms (see below). Therefore, always provide a TestContentClient. |
| 159 // Explanation: When Death Tests fork, there is a valid ContentClient. | 159 // Explanation: When Death Tests fork, there is a valid ContentClient. |
| 160 // However, when they launch a new process instead of forking, the global | 160 // However, when they launch a new process instead of forking, the global |
| 161 // variable is not copied and for some reason TestContentClientInitializer | 161 // variable is not copied and for some reason TestContentClientInitializer |
| 162 // does not get created to set the global variable in the new process. | 162 // does not get created to set the global variable in the new process. |
| 163 SetContentClient(&test_content_client_); | 163 SetContentClient(&test_content_client_); |
| 164 SetRendererClientForTesting(&content_renderer_client_); | 164 SetRendererClientForTesting(&content_renderer_client_); |
| 165 } | 165 } |
| 166 | 166 |
| 167 virtual void SetUp() override { | 167 void SetUp() override { AddContainerAndCodecMasksForTest(); } |
| 168 AddContainerAndCodecMasksForTest(); | |
| 169 } | |
| 170 | 168 |
| 171 virtual ~KeySystemsTest() { | 169 ~KeySystemsTest() override { |
| 172 // Clear the use of content_client_, which was set in SetUp(). | 170 // Clear the use of content_client_, which was set in SetUp(). |
| 173 SetContentClient(NULL); | 171 SetContentClient(NULL); |
| 174 } | 172 } |
| 175 | 173 |
| 176 typedef std::vector<std::string> CodecVector; | 174 typedef std::vector<std::string> CodecVector; |
| 177 | 175 |
| 178 const CodecVector& no_codecs() const { return no_codecs_; } | 176 const CodecVector& no_codecs() const { return no_codecs_; } |
| 179 | 177 |
| 180 const CodecVector& vp8_codec() const { return vp8_codec_; } | 178 const CodecVector& vp8_codec() const { return vp8_codec_; } |
| 181 const CodecVector& vp80_codec() const { return vp80_codec_; } | 179 const CodecVector& vp80_codec() const { return vp80_codec_; } |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 | 640 |
| 643 #if defined(WIDEVINE_CDM_AVAILABLE) | 641 #if defined(WIDEVINE_CDM_AVAILABLE) |
| 644 const char* const kTestWidevineUmaName = "Widevine"; | 642 const char* const kTestWidevineUmaName = "Widevine"; |
| 645 #else | 643 #else |
| 646 const char* const kTestWidevineUmaName = "Unknown"; | 644 const char* const kTestWidevineUmaName = "Unknown"; |
| 647 #endif | 645 #endif |
| 648 EXPECT_EQ(kTestWidevineUmaName, KeySystemNameForUMA("com.widevine.alpha")); | 646 EXPECT_EQ(kTestWidevineUmaName, KeySystemNameForUMA("com.widevine.alpha")); |
| 649 } | 647 } |
| 650 | 648 |
| 651 } // namespace content | 649 } // namespace content |
| OLD | NEW |