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

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

Issue 11414138: Encrypted Media: No NeedKey if --enable-encrypted-media is not set. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix tests 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
« no previous file with comments | « content/browser/DEPS ('k') | content/public/common/content_switches.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"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "content/browser/web_contents/web_contents_impl.h" 12 #include "content/browser/web_contents/web_contents_impl.h"
13 #include "content/public/common/content_switches.h" 13 #include "content/public/common/content_switches.h"
14 #include "content/public/test/browser_test_utils.h" 14 #include "content/public/test/browser_test_utils.h"
15 #include "content/shell/shell.h" 15 #include "content/shell/shell.h"
16 #include "content/test/content_browser_test.h" 16 #include "content/test/content_browser_test.h"
17 #include "content/test/content_browser_test_utils.h" 17 #include "content/test/content_browser_test_utils.h"
18 #include "googleurl/src/gurl.h" 18 #include "googleurl/src/gurl.h"
19 #include "media/base/media_switches.h"
19 #include "webkit/media/crypto/key_systems.h" 20 #include "webkit/media/crypto/key_systems.h"
20 21
21 // Platform-specific filename relative to the chrome executable. 22 // Platform-specific filename relative to the chrome executable.
22 #if defined(OS_WIN) 23 #if defined(OS_WIN)
23 static const wchar_t kLibraryName[] = L"clearkeycdmplugin.dll"; 24 static const wchar_t kLibraryName[] = L"clearkeycdmplugin.dll";
24 #elif defined(OS_MACOSX) 25 #elif defined(OS_MACOSX)
25 static const char kLibraryName[] = "clearkeycdmplugin.plugin"; 26 static const char kLibraryName[] = "clearkeycdmplugin.plugin";
26 #elif defined(OS_POSIX) 27 #elif defined(OS_POSIX)
27 static const char kLibraryName[] = "libclearkeycdmplugin.so"; 28 static const char kLibraryName[] = "libclearkeycdmplugin.so";
28 #endif 29 #endif
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 #endif 123 #endif
123 124
124 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, InvalidKeySystem) { 125 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, InvalidKeySystem) {
125 const string16 kExpected = ASCIIToUTF16( 126 const string16 kExpected = ASCIIToUTF16(
126 StringToUpperASCII(std::string("GenerateKeyRequestException"))); 127 StringToUpperASCII(std::string("GenerateKeyRequestException")));
127 ASSERT_NO_FATAL_FAILURE( 128 ASSERT_NO_FATAL_FAILURE(
128 TestSimplePlayback("bear-320x240-av-enc_av.webm", kWebMAudioVideo, 129 TestSimplePlayback("bear-320x240-av-enc_av.webm", kWebMAudioVideo,
129 "com.example.invalid", kExpected)); 130 "com.example.invalid", kExpected));
130 } 131 }
131 132
132 // TODO: Make these three IN_PROC_BROWSER_TEST_P() when internal Clear Key 133 // TODO(shadi): Make these three IN_PROC_BROWSER_TEST_P() when internal Clear
133 // supports encrypted audio. 134 // Key supports encrypted audio.
134 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, MAYBE(BasicPlayback_AudioOnly)) { 135 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, MAYBE(BasicPlayback_AudioOnly)) {
135 const string16 kExpected = ASCIIToUTF16("ENDED"); 136 const string16 kExpected = ASCIIToUTF16("ENDED");
136 ASSERT_NO_FATAL_FAILURE( 137 ASSERT_NO_FATAL_FAILURE(
137 TestSimplePlayback("bear-a-enc_a.webm", kWebMAudioOnly, 138 TestSimplePlayback("bear-a-enc_a.webm", kWebMAudioOnly,
138 kExternalClearKeyKeySystem, kExpected)); 139 kExternalClearKeyKeySystem, kExpected));
139 } 140 }
140 141
141 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, 142 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest,
142 MAYBE(BasicPlayback_AudioClearVideo)) { 143 MAYBE(BasicPlayback_AudioClearVideo)) {
143 const string16 kExpected = ASCIIToUTF16("ENDED"); 144 const string16 kExpected = ASCIIToUTF16("ENDED");
(...skipping 22 matching lines...) Expand all
166 TestSimplePlayback("bear-320x240-av-enc_v.webm", kWebMAudioVideo, 167 TestSimplePlayback("bear-320x240-av-enc_v.webm", kWebMAudioVideo,
167 GetParam(), kExpected)); 168 GetParam(), kExpected));
168 } 169 }
169 170
170 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, FrameChangeVideo) { 171 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, FrameChangeVideo) {
171 const string16 kExpected = ASCIIToUTF16("ENDED"); 172 const string16 kExpected = ASCIIToUTF16("ENDED");
172 ASSERT_NO_FATAL_FAILURE(TestFrameSizeChange(GetParam(), kExpected)); 173 ASSERT_NO_FATAL_FAILURE(TestFrameSizeChange(GetParam(), kExpected));
173 } 174 }
174 175
175 } // namespace content 176 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/DEPS ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698