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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 | 175 |
176 // MediaClient implementation. | 176 // MediaClient implementation. |
177 void AddKeySystemsInfoForUMA( | 177 void AddKeySystemsInfoForUMA( |
178 std::vector<KeySystemInfoForUMA>* key_systems_info_for_uma) final; | 178 std::vector<KeySystemInfoForUMA>* key_systems_info_for_uma) final; |
179 bool IsKeySystemsUpdateNeeded() final; | 179 bool IsKeySystemsUpdateNeeded() final; |
180 void AddSupportedKeySystems(std::vector<std::unique_ptr<KeySystemProperties>>* | 180 void AddSupportedKeySystems(std::vector<std::unique_ptr<KeySystemProperties>>* |
181 key_systems_properties) override; | 181 key_systems_properties) override; |
182 void RecordRapporURL(const std::string& metric, const GURL& url) final; | 182 void RecordRapporURL(const std::string& metric, const GURL& url) final; |
183 bool IsSupportedVideoConfig(media::VideoCodec codec, | 183 bool IsSupportedVideoConfig(media::VideoCodec codec, |
184 media::VideoCodecProfile profile, | 184 media::VideoCodecProfile profile, |
185 int level) final; | 185 int level, |
| 186 gfx::ColorSpace::TransferID eotf) final; |
186 | 187 |
187 // Helper function to test the case where IsKeySystemsUpdateNeeded() is true | 188 // Helper function to test the case where IsKeySystemsUpdateNeeded() is true |
188 // after AddSupportedKeySystems() is called. | 189 // after AddSupportedKeySystems() is called. |
189 void SetKeySystemsUpdateNeeded(); | 190 void SetKeySystemsUpdateNeeded(); |
190 | 191 |
191 // Helper function to disable "kExternal" key system support so that we can | 192 // Helper function to disable "kExternal" key system support so that we can |
192 // test the key system update case. | 193 // test the key system update case. |
193 void DisableExternalKeySystemSupport(); | 194 void DisableExternalKeySystemSupport(); |
194 | 195 |
195 private: | 196 private: |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 is_update_needed_ = false; | 229 is_update_needed_ = false; |
229 } | 230 } |
230 | 231 |
231 void TestMediaClient::RecordRapporURL(const std::string& /* metric */, | 232 void TestMediaClient::RecordRapporURL(const std::string& /* metric */, |
232 const GURL& /* url */) { | 233 const GURL& /* url */) { |
233 NOTIMPLEMENTED(); | 234 NOTIMPLEMENTED(); |
234 } | 235 } |
235 | 236 |
236 bool TestMediaClient::IsSupportedVideoConfig(media::VideoCodec codec, | 237 bool TestMediaClient::IsSupportedVideoConfig(media::VideoCodec codec, |
237 media::VideoCodecProfile profile, | 238 media::VideoCodecProfile profile, |
238 int level) { | 239 int level, |
| 240 gfx::ColorSpace::TransferID eotf) { |
239 return true; | 241 return true; |
240 } | 242 } |
241 | 243 |
242 void TestMediaClient::SetKeySystemsUpdateNeeded() { | 244 void TestMediaClient::SetKeySystemsUpdateNeeded() { |
243 is_update_needed_ = true; | 245 is_update_needed_ = true; |
244 } | 246 } |
245 | 247 |
246 void TestMediaClient::DisableExternalKeySystemSupport() { | 248 void TestMediaClient::DisableExternalKeySystemSupport() { |
247 supports_external_key_system_ = false; | 249 supports_external_key_system_ = false; |
248 } | 250 } |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.something.else")); | 775 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.something.else")); |
774 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.other")); | 776 EXPECT_FALSE(IsSupportedKeySystem("com.chromecast.other")); |
775 | 777 |
776 EXPECT_FALSE(IsSupportedKeySystem("x-")); | 778 EXPECT_FALSE(IsSupportedKeySystem("x-")); |
777 EXPECT_TRUE(IsSupportedKeySystem("x-something")); | 779 EXPECT_TRUE(IsSupportedKeySystem("x-something")); |
778 EXPECT_FALSE(IsSupportedKeySystem("x-something.else")); | 780 EXPECT_FALSE(IsSupportedKeySystem("x-something.else")); |
779 EXPECT_FALSE(IsSupportedKeySystem("x-other")); | 781 EXPECT_FALSE(IsSupportedKeySystem("x-other")); |
780 } | 782 } |
781 | 783 |
782 } // namespace media | 784 } // namespace media |
OLD | NEW |