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/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "base/win/windows_version.h" | 7 #include "base/win/windows_version.h" |
8 #include "content/browser/media/media_browsertest.h" | 8 #include "content/browser/media/media_browsertest.h" |
9 #include "content/public/common/content_switches.h" | 9 #include "content/public/common/content_switches.h" |
10 #include "content/public/test/browser_test_utils.h" | 10 #include "content/public/test/browser_test_utils.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 kEnded); | 118 kEnded); |
119 } | 119 } |
120 | 120 |
121 protected: | 121 protected: |
122 // We want to fail quickly when a test fails because an error is encountered. | 122 // We want to fail quickly when a test fails because an error is encountered. |
123 virtual void AddWaitForTitles(content::TitleWatcher* title_watcher) OVERRIDE { | 123 virtual void AddWaitForTitles(content::TitleWatcher* title_watcher) OVERRIDE { |
124 MediaBrowserTest::AddWaitForTitles(title_watcher); | 124 MediaBrowserTest::AddWaitForTitles(title_watcher); |
125 title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kEmeNotSupportedError)); | 125 title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kEmeNotSupportedError)); |
126 title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kEmeKeyError)); | 126 title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kEmeKeyError)); |
127 } | 127 } |
| 128 |
| 129 #if defined(OS_ANDROID) |
| 130 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 131 command_line->AppendSwitch( |
| 132 switches::kDisableGestureRequirementForMediaPlayback); |
| 133 } |
| 134 #endif |
128 }; | 135 }; |
129 | 136 |
130 using ::testing::Combine; | 137 using ::testing::Combine; |
131 using ::testing::Values; | 138 using ::testing::Values; |
132 | 139 |
133 #if !defined(OS_ANDROID) | 140 #if !defined(OS_ANDROID) |
134 // Encrypted media playback with SRC is not supported on Android. | 141 // Encrypted media playback with SRC is not supported on Android. |
135 INSTANTIATE_TEST_CASE_P(SRC_ClearKey, EncryptedMediaTest, | 142 INSTANTIATE_TEST_CASE_P(SRC_ClearKey, EncryptedMediaTest, |
136 Combine(Values(kClearKeyKeySystem), Values(SRC))); | 143 Combine(Values(kClearKeyKeySystem), Values(SRC))); |
137 #endif // !defined(OS_ANDROID) | 144 #endif // !defined(OS_ANDROID) |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, UnknownKeySystemThrowsException) { | 182 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, UnknownKeySystemThrowsException) { |
176 RunEncryptedMediaTest(kDefaultEmePlayer, | 183 RunEncryptedMediaTest(kDefaultEmePlayer, |
177 "bear-a_enc-a.webm", | 184 "bear-a_enc-a.webm", |
178 kWebMAudioOnly, | 185 kWebMAudioOnly, |
179 "com.example.foo", | 186 "com.example.foo", |
180 MSE, | 187 MSE, |
181 kEmeNotSupportedError); | 188 kEmeNotSupportedError); |
182 } | 189 } |
183 | 190 |
184 } // namespace content | 191 } // namespace content |
OLD | NEW |