OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <memory> | 5 #include <memory> |
6 | 6 |
7 #include "base/android/build_info.h" | 7 #include "base/android/build_info.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "media/base/android/media_drm_bridge.h" | 12 #include "media/base/android/media_drm_bridge.h" |
13 #include "media/base/android/provision_fetcher.h" | 13 #include "media/base/provision_fetcher.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. | 16 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
17 | 17 |
18 namespace media { | 18 namespace media { |
19 | 19 |
20 #define EXPECT_TRUE_IF_WIDEVINE_AVAILABLE(a) \ | 20 #define EXPECT_TRUE_IF_WIDEVINE_AVAILABLE(a) \ |
21 do { \ | 21 do { \ |
22 if (!MediaDrmBridge::IsKeySystemSupported(kWidevineKeySystem)) { \ | 22 if (!MediaDrmBridge::IsKeySystemSupported(kWidevineKeySystem)) { \ |
23 VLOG(0) << "Widevine not supported on device."; \ | 23 VLOG(0) << "Widevine not supported on device."; \ |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // We test "L3" fully. But for "L1" we don't check the result as it depends on | 115 // We test "L3" fully. But for "L1" we don't check the result as it depends on |
116 // whether the test device supports "L1". | 116 // whether the test device supports "L1". |
117 EXPECT_TRUE_IF_WIDEVINE_AVAILABLE(MediaDrmBridge::CreateWithoutSessionSupport( | 117 EXPECT_TRUE_IF_WIDEVINE_AVAILABLE(MediaDrmBridge::CreateWithoutSessionSupport( |
118 kWidevineKeySystem, kL3, base::Bind(&MockProvisionFetcher::Create))); | 118 kWidevineKeySystem, kL3, base::Bind(&MockProvisionFetcher::Create))); |
119 | 119 |
120 MediaDrmBridge::CreateWithoutSessionSupport( | 120 MediaDrmBridge::CreateWithoutSessionSupport( |
121 kWidevineKeySystem, kL1, base::Bind(&MockProvisionFetcher::Create)); | 121 kWidevineKeySystem, kL1, base::Bind(&MockProvisionFetcher::Create)); |
122 } | 122 } |
123 | 123 |
124 } // namespace media | 124 } // namespace media |
OLD | NEW |