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 using ::testing::Combine; | 107 INSTANTIATE_TEST_CASE_P(ClearKey, EncryptedMediaTest, |
108 using ::testing::Values; | 108 ::testing::Combine( |
109 | 109 ::testing::Values(kClearKeyKeySystem), ::testing::Values(SRC, MSE))); |
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))); | |
118 | 110 |
119 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioOnly_WebM) { | 111 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioOnly_WebM) { |
120 TestSimplePlayback("bear-a-enc_a.webm", kWebMAudioOnly); | 112 TestSimplePlayback("bear-a-enc_a.webm", kWebMAudioOnly); |
121 } | 113 } |
122 | 114 |
123 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioClearVideo_WebM) { | 115 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioClearVideo_WebM) { |
124 TestSimplePlayback("bear-320x240-av-enc_a.webm", kWebMAudioVideo); | 116 TestSimplePlayback("bear-320x240-av-enc_a.webm", kWebMAudioVideo); |
125 } | 117 } |
126 | 118 |
127 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoAudio_WebM) { | 119 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoAudio_WebM) { |
(...skipping 16 matching lines...) Expand all Loading... |
144 // Times out on Windows XP. http://crbug.com/171937 | 136 // Times out on Windows XP. http://crbug.com/171937 |
145 #if defined(OS_WIN) | 137 #if defined(OS_WIN) |
146 if (base::win::GetVersion() < base::win::VERSION_VISTA) | 138 if (base::win::GetVersion() < base::win::VERSION_VISTA) |
147 return; | 139 return; |
148 #endif | 140 #endif |
149 TestFrameSizeChange(); | 141 TestFrameSizeChange(); |
150 } | 142 } |
151 | 143 |
152 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, UnknownKeySystemThrowsException) { | 144 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, UnknownKeySystemThrowsException) { |
153 RunEncryptedMediaTest("encrypted_media_player.html", "bear-a-enc_a.webm", | 145 RunEncryptedMediaTest("encrypted_media_player.html", "bear-a-enc_a.webm", |
154 kWebMAudioOnly, "com.example.foo", MSE, | 146 kWebMAudioOnly, "com.example.foo", SRC, |
155 kEmeGkrException); | 147 kEmeGkrException); |
156 } | 148 } |
157 | 149 |
158 } // namespace content | 150 } // namespace content |
OLD | NEW |