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

Side by Side Diff: chrome/browser/media/encrypted_media_browsertest.cc

Issue 116443009: Handle plugin instance crash in ContentDecryptorDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 6 years, 11 months 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/media/media_browsertest.h" 9 #include "chrome/browser/media/media_browsertest.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 22 matching lines...) Expand all
33 33
34 // Available key systems. 34 // Available key systems.
35 const char kClearKeyKeySystem[] = "webkit-org.w3.clearkey"; 35 const char kClearKeyKeySystem[] = "webkit-org.w3.clearkey";
36 const char kExternalClearKeyKeySystem[] = "org.chromium.externalclearkey"; 36 const char kExternalClearKeyKeySystem[] = "org.chromium.externalclearkey";
37 const char kExternalClearKeyDecryptOnlyKeySystem[] = 37 const char kExternalClearKeyDecryptOnlyKeySystem[] =
38 "org.chromium.externalclearkey.decryptonly"; 38 "org.chromium.externalclearkey.decryptonly";
39 const char kExternalClearKeyFileIOTestKeySystem[] = 39 const char kExternalClearKeyFileIOTestKeySystem[] =
40 "org.chromium.externalclearkey.fileiotest"; 40 "org.chromium.externalclearkey.fileiotest";
41 const char kExternalClearKeyInitializeFailKeySystem[] = 41 const char kExternalClearKeyInitializeFailKeySystem[] =
42 "org.chromium.externalclearkey.initializefail"; 42 "org.chromium.externalclearkey.initializefail";
43 const char kExternalClearKeyCrashKeySystem[] =
44 "org.chromium.externalclearkey.crash";
43 45
44 // Supported media types. 46 // Supported media types.
45 const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\""; 47 const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\"";
46 const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\""; 48 const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\"";
47 const char kWebMAudioVideo[] = "video/webm; codecs=\"vorbis, vp8\""; 49 const char kWebMAudioVideo[] = "video/webm; codecs=\"vorbis, vp8\"";
48 #if defined(USE_PROPRIETARY_CODECS) 50 #if defined(USE_PROPRIETARY_CODECS)
49 const char kMP4AudioOnly[] = "audio/mp4; codecs=\"mp4a.40.2\""; 51 const char kMP4AudioOnly[] = "audio/mp4; codecs=\"mp4a.40.2\"";
50 const char kMP4VideoOnly[] = "video/mp4; codecs=\"avc1.4D4041\""; 52 const char kMP4VideoOnly[] = "video/mp4; codecs=\"avc1.4D4041\"";
51 #endif // defined(USE_PROPRIETARY_CODECS) 53 #endif // defined(USE_PROPRIETARY_CODECS)
52 54
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 #if defined(ENABLE_PEPPER_CDMS) 395 #if defined(ENABLE_PEPPER_CDMS)
394 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, InitializeCDMFail) { 396 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, InitializeCDMFail) {
395 RunEncryptedMediaTest("encrypted_media_player.html", 397 RunEncryptedMediaTest("encrypted_media_player.html",
396 "bear-a-enc_a.webm", 398 "bear-a-enc_a.webm",
397 kWebMAudioOnly, 399 kWebMAudioOnly,
398 kExternalClearKeyInitializeFailKeySystem, 400 kExternalClearKeyInitializeFailKeySystem,
399 SRC, 401 SRC,
400 kEmeKeyError); 402 kEmeKeyError);
401 } 403 }
402 404
405 // When CDM crashes, we should still get a decode error.
406 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, CDMCrashDuringDecode) {
407 RunEncryptedMediaTest("encrypted_media_player.html",
408 "bear-a-enc_a.webm",
409 kWebMAudioOnly,
410 kExternalClearKeyCrashKeySystem,
411 SRC,
412 kError);
ddorwin 2014/01/08 23:40:32 General comment for our browsertests: It would be
xhwang 2014/01/09 01:58:49 Added TODO.
413 }
414
403 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, FileIOTest) { 415 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, FileIOTest) {
404 RunEncryptedMediaTest("encrypted_media_player.html", 416 RunEncryptedMediaTest("encrypted_media_player.html",
405 "bear-a-enc_a.webm", 417 "bear-a-enc_a.webm",
406 kWebMAudioOnly, 418 kWebMAudioOnly,
407 kExternalClearKeyFileIOTestKeySystem, 419 kExternalClearKeyFileIOTestKeySystem,
408 SRC, 420 SRC,
409 kFileIOTestSuccess); 421 kFileIOTestSuccess);
410 } 422 }
411 #endif // defined(ENABLE_PEPPER_CDMS) 423 #endif // defined(ENABLE_PEPPER_CDMS)
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/media/chrome_key_systems.cc » ('j') | content/renderer/media/crypto/ppapi_decryptor.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698