Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Side by Side Diff: content/browser/encrypted_media_browsertest.cc

Issue 11492003: Encrypted Media: Support Audio Decrypt-Only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | media/filters/audio_decoder_selector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 #endif 123 #endif
124 124
125 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, InvalidKeySystem) { 125 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, InvalidKeySystem) {
126 const string16 kExpected = ASCIIToUTF16( 126 const string16 kExpected = ASCIIToUTF16(
127 StringToUpperASCII(std::string("GenerateKeyRequestException"))); 127 StringToUpperASCII(std::string("GenerateKeyRequestException")));
128 ASSERT_NO_FATAL_FAILURE( 128 ASSERT_NO_FATAL_FAILURE(
129 TestSimplePlayback("bear-320x240-av-enc_av.webm", kWebMAudioVideo, 129 TestSimplePlayback("bear-320x240-av-enc_av.webm", kWebMAudioVideo,
130 "com.example.invalid", kExpected)); 130 "com.example.invalid", kExpected));
131 } 131 }
132 132
133 // TODO(shadi): Make these three IN_PROC_BROWSER_TEST_P() when internal Clear 133 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, MAYBE(BasicPlayback_AudioOnly)) {
134 // Key supports encrypted audio.
135 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, MAYBE(BasicPlayback_AudioOnly)) {
136 const string16 kExpected = ASCIIToUTF16("ENDED"); 134 const string16 kExpected = ASCIIToUTF16("ENDED");
137 ASSERT_NO_FATAL_FAILURE( 135 ASSERT_NO_FATAL_FAILURE(
138 TestSimplePlayback("bear-a-enc_a.webm", kWebMAudioOnly, 136 TestSimplePlayback("bear-a-enc_a.webm", kWebMAudioOnly,
139 kExternalClearKeyKeySystem, kExpected)); 137 GetParam(), kExpected));
140 } 138 }
141 139
142 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, 140 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest,
143 MAYBE(BasicPlayback_AudioClearVideo)) { 141 MAYBE(BasicPlayback_AudioClearVideo)) {
144 const string16 kExpected = ASCIIToUTF16("ENDED"); 142 const string16 kExpected = ASCIIToUTF16("ENDED");
145 ASSERT_NO_FATAL_FAILURE( 143 ASSERT_NO_FATAL_FAILURE(
146 TestSimplePlayback("bear-320x240-av-enc_a.webm", kWebMAudioVideo, 144 TestSimplePlayback("bear-320x240-av-enc_a.webm", kWebMAudioVideo,
147 kExternalClearKeyKeySystem, kExpected)); 145 GetParam(), kExpected));
148 } 146 }
149 147
150 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, MAYBE(BasicPlayback_VideoAudio)) { 148 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, MAYBE(BasicPlayback_VideoAudio)) {
151 const string16 kExpected = ASCIIToUTF16("ENDED"); 149 const string16 kExpected = ASCIIToUTF16("ENDED");
152 ASSERT_NO_FATAL_FAILURE( 150 ASSERT_NO_FATAL_FAILURE(
153 TestSimplePlayback("bear-320x240-av-enc_av.webm", kWebMAudioVideo, 151 TestSimplePlayback("bear-320x240-av-enc_av.webm", kWebMAudioVideo,
154 kExternalClearKeyKeySystem, kExpected)); 152 GetParam(), kExpected));
155 } 153 }
156 154
157 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, BasicPlayback_VideoOnly) { 155 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, BasicPlayback_VideoOnly) {
158 const string16 kExpected = ASCIIToUTF16("ENDED"); 156 const string16 kExpected = ASCIIToUTF16("ENDED");
159 ASSERT_NO_FATAL_FAILURE( 157 ASSERT_NO_FATAL_FAILURE(
160 TestSimplePlayback("bear-320x240-v-enc_v.webm", kWebMVideoOnly, 158 TestSimplePlayback("bear-320x240-v-enc_v.webm", kWebMVideoOnly,
161 GetParam(), kExpected)); 159 GetParam(), kExpected));
162 } 160 }
163 161
164 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, BasicPlayback_VideoClearAudio) { 162 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, BasicPlayback_VideoClearAudio) {
165 const string16 kExpected = ASCIIToUTF16("ENDED"); 163 const string16 kExpected = ASCIIToUTF16("ENDED");
166 ASSERT_NO_FATAL_FAILURE( 164 ASSERT_NO_FATAL_FAILURE(
167 TestSimplePlayback("bear-320x240-av-enc_v.webm", kWebMAudioVideo, 165 TestSimplePlayback("bear-320x240-av-enc_v.webm", kWebMAudioVideo,
168 GetParam(), kExpected)); 166 GetParam(), kExpected));
169 } 167 }
170 168
171 // TODO(acolwell): Reenable when the changes for http://webk.it/104583 land. 169 // TODO(acolwell): Reenable when the changes for http://webk.it/104583 land.
172 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, DISABLED_FrameChangeVideo) { 170 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, DISABLED_FrameChangeVideo) {
173 const string16 kExpected = ASCIIToUTF16("ENDED"); 171 const string16 kExpected = ASCIIToUTF16("ENDED");
174 ASSERT_NO_FATAL_FAILURE(TestFrameSizeChange(GetParam(), kExpected)); 172 ASSERT_NO_FATAL_FAILURE(TestFrameSizeChange(GetParam(), kExpected));
175 } 173 }
176 174
177 } // namespace content 175 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/filters/audio_decoder_selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698