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

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

Issue 206693004: Update media browser tests to observe plugin crashes! (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 9 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
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/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "chrome/browser/media/media_browsertest.h" 10 #include "chrome/browser/media/media_browsertest.h"
11 #include "chrome/browser/media/test_license_server.h" 11 #include "chrome/browser/media/test_license_server.h"
12 #include "chrome/browser/media/wv_test_license_server_config.h" 12 #include "chrome/browser/media/wv_test_license_server_config.h"
13 #include "chrome/browser/ui/browser.h" 13 #include "chrome/browser/ui/browser.h"
14 #include "chrome/browser/ui/tabs/tab_strip_model.h" 14 #include "chrome/browser/ui/tabs/tab_strip_model.h"
15 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
16 #include "content/public/test/browser_test_utils.h" 16 #include "content/public/test/browser_test_utils.h"
17 #include "testing/gtest/include/gtest/gtest-spi.h"
17 #if defined(OS_ANDROID) 18 #if defined(OS_ANDROID)
18 #include "base/android/build_info.h" 19 #include "base/android/build_info.h"
19 #endif 20 #endif
20 21
21 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. 22 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
22 23
23 #if defined(ENABLE_PEPPER_CDMS) 24 #if defined(ENABLE_PEPPER_CDMS)
24 // Platform-specific filename relative to the chrome executable. 25 // Platform-specific filename relative to the chrome executable.
25 const char kClearKeyCdmAdapterFileName[] = 26 const char kClearKeyCdmAdapterFileName[] =
26 #if defined(OS_MACOSX) 27 #if defined(OS_MACOSX)
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 } 620 }
620 #endif // defined(WIDEVINE_CDM_AVAILABLE) 621 #endif // defined(WIDEVINE_CDM_AVAILABLE)
621 622
622 #if defined(ENABLE_PEPPER_CDMS) 623 #if defined(ENABLE_PEPPER_CDMS)
623 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, InitializeCDMFail) { 624 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, InitializeCDMFail) {
624 TestNonPlaybackCases(kExternalClearKeyInitializeFailKeySystem, kEmeKeyError); 625 TestNonPlaybackCases(kExternalClearKeyInitializeFailKeySystem, kEmeKeyError);
625 } 626 }
626 627
627 // When CDM crashes, we should still get a decode error. 628 // When CDM crashes, we should still get a decode error.
628 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, CDMCrashDuringDecode) { 629 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, CDMCrashDuringDecode) {
630 IgnorePluginCrash(true);
629 TestNonPlaybackCases(kExternalClearKeyCrashKeySystem, kError); 631 TestNonPlaybackCases(kExternalClearKeyCrashKeySystem, kError);
630 } 632 }
631 633
634 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, CDMExpectedCrash) {
ddorwin 2014/03/21 17:06:29 This is really testing the test framework, right?
shadi1 2014/03/21 18:43:54 Done.
635 // Plugin crash is not ignored by defualt, the test is expected to fail.
636 EXPECT_NONFATAL_FAILURE(
637 TestNonPlaybackCases(kExternalClearKeyCrashKeySystem, kError),
638 "plugin crash");
639 }
640
632 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, FileIOTest) { 641 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, FileIOTest) {
633 TestNonPlaybackCases(kExternalClearKeyFileIOTestKeySystem, 642 TestNonPlaybackCases(kExternalClearKeyFileIOTestKeySystem,
634 kFileIOTestSuccess); 643 kFileIOTestSuccess);
635 } 644 }
636 645
637 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, LoadLoadableSession) { 646 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, LoadLoadableSession) {
638 RunEncryptedMediaTest("encrypted_media_player.html", 647 RunEncryptedMediaTest("encrypted_media_player.html",
639 "bear-320x240-v-enc_v.webm", 648 "bear-320x240-v-enc_v.webm",
640 kWebMVideoOnly, 649 kWebMVideoOnly,
641 kExternalClearKeyKeySystem, 650 kExternalClearKeyKeySystem,
(...skipping 10 matching lines...) Expand all
652 "bear-320x240-v-enc_v.webm", 661 "bear-320x240-v-enc_v.webm",
653 kWebMVideoOnly, 662 kWebMVideoOnly,
654 kExternalClearKeyKeySystem, 663 kExternalClearKeyKeySystem,
655 SRC, 664 SRC,
656 PREFIXED, 665 PREFIXED,
657 kUnknownSession, 666 kUnknownSession,
658 false, 667 false,
659 kEmeKeyError); 668 kEmeKeyError);
660 } 669 }
661 #endif // defined(ENABLE_PEPPER_CDMS) 670 #endif // defined(ENABLE_PEPPER_CDMS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media/media_browsertest.h » ('j') | chrome/browser/media/media_browsertest.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698