OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "base/win/windows_version.h" | 8 #include "base/win/windows_version.h" |
9 #include "content/browser/media/media_browsertest.h" | 9 #include "content/browser/media/media_browsertest.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 97 } |
98 | 98 |
99 #if defined(OS_ANDROID) | 99 #if defined(OS_ANDROID) |
100 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 100 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
101 command_line->AppendSwitch( | 101 command_line->AppendSwitch( |
102 switches::kDisableGestureRequirementForMediaPlayback); | 102 switches::kDisableGestureRequirementForMediaPlayback); |
103 } | 103 } |
104 #endif | 104 #endif |
105 }; | 105 }; |
106 | 106 |
107 INSTANTIATE_TEST_CASE_P(ClearKey, EncryptedMediaTest, | 107 using ::testing::Combine; |
108 ::testing::Combine( | 108 using ::testing::Values; |
109 ::testing::Values(kClearKeyKeySystem), ::testing::Values(SRC, MSE))); | 109 |
| 110 #if !defined(OS_ANDROID) |
| 111 // Encrypted media playback with SRC is not supported on Android. |
| 112 INSTANTIATE_TEST_CASE_P(SRC_ClearKey, EncryptedMediaTest, |
| 113 Combine(Values(kClearKeyKeySystem), Values(SRC))); |
| 114 #endif // defined(OS_ANDROID) |
| 115 |
| 116 INSTANTIATE_TEST_CASE_P(MSE_ClearKey, EncryptedMediaTest, |
| 117 Combine(Values(kClearKeyKeySystem), Values(MSE))); |
110 | 118 |
111 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioOnly_WebM) { | 119 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioOnly_WebM) { |
112 TestSimplePlayback("bear-a-enc_a.webm", kWebMAudioOnly); | 120 TestSimplePlayback("bear-a-enc_a.webm", kWebMAudioOnly); |
113 } | 121 } |
114 | 122 |
115 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioClearVideo_WebM) { | 123 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioClearVideo_WebM) { |
116 TestSimplePlayback("bear-320x240-av-enc_a.webm", kWebMAudioVideo); | 124 TestSimplePlayback("bear-320x240-av-enc_a.webm", kWebMAudioVideo); |
117 } | 125 } |
118 | 126 |
119 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoAudio_WebM) { | 127 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoAudio_WebM) { |
(...skipping 16 matching lines...) Expand all Loading... |
136 // Times out on Windows XP. http://crbug.com/171937 | 144 // Times out on Windows XP. http://crbug.com/171937 |
137 #if defined(OS_WIN) | 145 #if defined(OS_WIN) |
138 if (base::win::GetVersion() < base::win::VERSION_VISTA) | 146 if (base::win::GetVersion() < base::win::VERSION_VISTA) |
139 return; | 147 return; |
140 #endif | 148 #endif |
141 TestFrameSizeChange(); | 149 TestFrameSizeChange(); |
142 } | 150 } |
143 | 151 |
144 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, UnknownKeySystemThrowsException) { | 152 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, UnknownKeySystemThrowsException) { |
145 RunEncryptedMediaTest("encrypted_media_player.html", "bear-a-enc_a.webm", | 153 RunEncryptedMediaTest("encrypted_media_player.html", "bear-a-enc_a.webm", |
146 kWebMAudioOnly, "com.example.foo", SRC, | 154 kWebMAudioOnly, "com.example.foo", MSE, |
147 kEmeGkrException); | 155 kEmeGkrException); |
148 } | 156 } |
149 | 157 |
150 } // namespace content | 158 } // namespace content |
OLD | NEW |