| 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 <utility> |
| 6 |
| 5 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 6 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 9 #include "base/win/windows_version.h" | 11 #include "base/win/windows_version.h" |
| 10 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 11 #include "chrome/browser/media/media_browsertest.h" | 13 #include "chrome/browser/media/media_browsertest.h" |
| 12 #include "chrome/browser/media/test_license_server.h" | 14 #include "chrome/browser/media/test_license_server.h" |
| 13 #include "chrome/browser/media/wv_test_license_server_config.h" | 15 #include "chrome/browser/media/wv_test_license_server_config.h" |
| 14 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 EXPECT_TRUE(receivedKeyMessage); | 211 EXPECT_TRUE(receivedKeyMessage); |
| 210 } | 212 } |
| 211 | 213 |
| 212 // Starts a license server if available for the |key_system| and adds a | 214 // Starts a license server if available for the |key_system| and adds a |
| 213 // 'licenseServerURL' query parameter to |query_params|. | 215 // 'licenseServerURL' query parameter to |query_params|. |
| 214 void StartLicenseServerIfNeeded(const std::string& key_system, | 216 void StartLicenseServerIfNeeded(const std::string& key_system, |
| 215 base::StringPairs* query_params) { | 217 base::StringPairs* query_params) { |
| 216 scoped_ptr<TestLicenseServerConfig> config = GetServerConfig(key_system); | 218 scoped_ptr<TestLicenseServerConfig> config = GetServerConfig(key_system); |
| 217 if (!config) | 219 if (!config) |
| 218 return; | 220 return; |
| 219 license_server_.reset(new TestLicenseServer(config.Pass())); | 221 license_server_.reset(new TestLicenseServer(std::move(config))); |
| 220 EXPECT_TRUE(license_server_->Start()); | 222 EXPECT_TRUE(license_server_->Start()); |
| 221 query_params->push_back( | 223 query_params->push_back( |
| 222 std::make_pair("licenseServerURL", license_server_->GetServerURL())); | 224 std::make_pair("licenseServerURL", license_server_->GetServerURL())); |
| 223 } | 225 } |
| 224 | 226 |
| 225 bool IsPlayBackPossible(const std::string& key_system) { | 227 bool IsPlayBackPossible(const std::string& key_system) { |
| 226 #if defined(WIDEVINE_CDM_AVAILABLE) | 228 #if defined(WIDEVINE_CDM_AVAILABLE) |
| 227 if (IsWidevine(key_system) && !GetServerConfig(key_system)) | 229 if (IsWidevine(key_system) && !GetServerConfig(key_system)) |
| 228 return false; | 230 return false; |
| 229 #endif // defined(WIDEVINE_CDM_AVAILABLE) | 231 #endif // defined(WIDEVINE_CDM_AVAILABLE) |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 } | 843 } |
| 842 | 844 |
| 843 IN_PROC_BROWSER_TEST_F(ECKPrefixedEncryptedMediaTest, LoadLoadableSession) { | 845 IN_PROC_BROWSER_TEST_F(ECKPrefixedEncryptedMediaTest, LoadLoadableSession) { |
| 844 TestPlaybackCase(kLoadableSession, kEnded); | 846 TestPlaybackCase(kLoadableSession, kEnded); |
| 845 } | 847 } |
| 846 | 848 |
| 847 IN_PROC_BROWSER_TEST_F(ECKPrefixedEncryptedMediaTest, LoadUnknownSession) { | 849 IN_PROC_BROWSER_TEST_F(ECKPrefixedEncryptedMediaTest, LoadUnknownSession) { |
| 848 TestPlaybackCase(kUnknownSession, kPrefixedEmeErrorEvent); | 850 TestPlaybackCase(kUnknownSession, kPrefixedEmeErrorEvent); |
| 849 } | 851 } |
| 850 #endif // defined(ENABLE_PEPPER_CDMS) | 852 #endif // defined(ENABLE_PEPPER_CDMS) |
| OLD | NEW |