Chromium Code Reviews| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 } | 92 } |
| 93 | 93 |
| 94 #if defined(OS_ANDROID) | 94 #if defined(OS_ANDROID) |
| 95 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 95 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 96 command_line->AppendSwitch( | 96 command_line->AppendSwitch( |
| 97 switches::kDisableGestureRequirementForMediaPlayback); | 97 switches::kDisableGestureRequirementForMediaPlayback); |
| 98 } | 98 } |
| 99 #endif | 99 #endif |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 INSTANTIATE_TEST_CASE_P(ClearKey, EncryptedMediaTest, | 102 using ::testing::Combine; |
| 103 ::testing::Combine( | 103 using ::testing::Values; |
| 104 ::testing::Values(kClearKeyKeySystem), ::testing::Values(SRC, MSE))); | 104 |
| 105 #if !defined(OS_ANDROID) | |
| 106 // TODO(xhwang): Encrypted media playback with SRC is not supported on Android. | |
|
ddorwin
2013/10/07 21:46:22
What are you planning "TODO" about this? IF nothin
xhwang
2013/10/07 22:05:24
Done.
| |
| 107 INSTANTIATE_TEST_CASE_P(SRC_ClearKey, EncryptedMediaTest, | |
| 108 Combine(Values(kClearKeyKeySystem), Values(SRC))); | |
| 109 #endif // defined(OS_ANDROID) | |
| 110 | |
| 111 INSTANTIATE_TEST_CASE_P(MSE_ClearKey, EncryptedMediaTest, | |
|
xhwang
2013/10/07 21:41:23
I prefix the tests with SRC/MSE so we can easily t
| |
| 112 Combine(Values(kClearKeyKeySystem), Values(MSE))); | |
| 105 | 113 |
| 106 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, ConfigChangeVideo_ClearKey) { | 114 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, ConfigChangeVideo_ClearKey) { |
| 107 TestConfigChange(kClearKeyKeySystem, kEnded); | 115 TestConfigChange(kClearKeyKeySystem, kEnded); |
| 108 } | 116 } |
| 109 | 117 |
| 110 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, InvalidKeySystem) { | 118 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, InvalidKeySystem) { |
| 111 TestMSESimplePlayback("bear-320x240-av-enc_av.webm", kWebMAudioVideo, | 119 TestMSESimplePlayback("bear-320x240-av-enc_av.webm", kWebMAudioVideo, |
| 112 "com.example.invalid", kEmeGkrException); | 120 "com.example.invalid", kEmeGkrException); |
| 113 } | 121 } |
| 114 | 122 |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 139 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, FrameChangeVideo) { | 147 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, FrameChangeVideo) { |
| 140 // Times out on Windows XP. http://crbug.com/171937 | 148 // Times out on Windows XP. http://crbug.com/171937 |
| 141 #if defined(OS_WIN) | 149 #if defined(OS_WIN) |
| 142 if (base::win::GetVersion() < base::win::VERSION_VISTA) | 150 if (base::win::GetVersion() < base::win::VERSION_VISTA) |
| 143 return; | 151 return; |
| 144 #endif | 152 #endif |
| 145 TestFrameSizeChange(GetParam(), kEnded); | 153 TestFrameSizeChange(GetParam(), kEnded); |
| 146 } | 154 } |
| 147 | 155 |
| 148 // TODO(shadi): Do we need both this and InvalidKeySystem? | 156 // TODO(shadi): Do we need both this and InvalidKeySystem? |
| 157 #if !defined(OS_ANDROID) | |
| 158 // TODO(xhwang): Encrypted media playback with SRC is not supported on Android. | |
|
ddorwin
2013/10/07 21:46:22
Just change it to MSE. There's no real reason this
xhwang
2013/10/07 22:05:24
Done.
| |
| 149 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, UnknownKeySystemThrowsException) { | 159 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, UnknownKeySystemThrowsException) { |
| 150 RunEncryptedMediaTest("encrypted_media_player.html", "bear-a-enc_a.webm", | 160 RunEncryptedMediaTest("encrypted_media_player.html", "bear-a-enc_a.webm", |
| 151 kWebMAudioOnly, "com.example.foo", SRC, | 161 kWebMAudioOnly, "com.example.foo", SRC, |
| 152 kEmeGkrException); | 162 kEmeGkrException); |
| 153 } | 163 } |
| 164 #endif // !defined(OS_ANDROID) | |
| 154 | 165 |
| 155 } // namespace content | 166 } // namespace content |
| OLD | NEW |