| Index: chrome/browser/media/chrome_media_stream_infobar_browsertest.cc
|
| diff --git a/chrome/browser/media/chrome_media_stream_infobar_browsertest.cc b/chrome/browser/media/chrome_media_stream_infobar_browsertest.cc
|
| index 059db344ff876ac191c9fdaf8fa46f5a30cd3b43..9ae0d1f77da23e8e3ac7382d17c12a97e38f4d35 100644
|
| --- a/chrome/browser/media/chrome_media_stream_infobar_browsertest.cc
|
| +++ b/chrome/browser/media/chrome_media_stream_infobar_browsertest.cc
|
| @@ -6,7 +6,6 @@
|
| #include "base/files/file_util.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "chrome/browser/chrome_notification_types.h"
|
| -#include "chrome/browser/infobars/infobar_service.h"
|
| #include "chrome/browser/media/media_stream_devices_controller.h"
|
| #include "chrome/browser/media/webrtc_browsertest_base.h"
|
| #include "chrome/browser/media/webrtc_browsertest_common.h"
|
| @@ -21,7 +20,6 @@
|
| #include "chrome/test/base/ui_test_utils.h"
|
| #include "components/content_settings/core/browser/host_content_settings_map.h"
|
| #include "components/content_settings/core/common/content_settings_types.h"
|
| -#include "components/infobars/core/infobar.h"
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/common/media_stream_request.h"
|
| #include "content/public/test/browser_test_utils.h"
|
| @@ -114,32 +112,29 @@ class MediaStreamPermissionTest : public WebRtcTestBase,
|
|
|
| // Actual tests ---------------------------------------------------------------
|
|
|
| -IN_PROC_BROWSER_TEST_P(MediaStreamPermissionTest,
|
| - DISABLED_TestAllowingUserMedia) {
|
| +IN_PROC_BROWSER_TEST_P(MediaStreamPermissionTest, TestAllowingUserMedia) {
|
| content::WebContents* tab_contents = LoadTestPageInTab();
|
| EXPECT_TRUE(GetUserMediaAndAccept(tab_contents));
|
| }
|
|
|
| -IN_PROC_BROWSER_TEST_P(MediaStreamPermissionTest,
|
| - DISABLED_TestDenyingUserMedia) {
|
| +IN_PROC_BROWSER_TEST_P(MediaStreamPermissionTest, TestDenyingUserMedia) {
|
| content::WebContents* tab_contents = LoadTestPageInTab();
|
| GetUserMediaAndDeny(tab_contents);
|
| }
|
|
|
| -IN_PROC_BROWSER_TEST_P(MediaStreamPermissionTest,
|
| - DISABLED_TestDismissingInfobar) {
|
| +IN_PROC_BROWSER_TEST_P(MediaStreamPermissionTest, TestDismissingRequest) {
|
| content::WebContents* tab_contents = LoadTestPageInTab();
|
| GetUserMediaAndDismiss(tab_contents);
|
| }
|
|
|
| IN_PROC_BROWSER_TEST_P(MediaStreamPermissionTest,
|
| - DISABLED_TestDenyingUserMediaIncognito) {
|
| + TestDenyingUserMediaIncognito) {
|
| content::WebContents* tab_contents = LoadTestPageInIncognitoTab();
|
| GetUserMediaAndDeny(tab_contents);
|
| }
|
|
|
| IN_PROC_BROWSER_TEST_P(MediaStreamPermissionTest,
|
| - DISABLED_TestAcceptThenDenyWhichShouldBeSticky) {
|
| + TestAcceptThenDenyWhichShouldBeSticky) {
|
| #if defined(OS_WIN) && defined(USE_ASH)
|
| // Disable this test in Metro+Ash for now (http://crbug.com/262796).
|
| if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| @@ -152,38 +147,33 @@ IN_PROC_BROWSER_TEST_P(MediaStreamPermissionTest,
|
| EXPECT_TRUE(GetUserMediaAndAccept(tab_contents));
|
| GetUserMediaAndDeny(tab_contents);
|
|
|
| - // Should fail with permission denied right away with no infobar popping up.
|
| + // Should fail with permission denied, instead of hanging.
|
| GetUserMedia(tab_contents, kAudioVideoCallConstraints);
|
| EXPECT_TRUE(test::PollingWaitUntil("obtainGetUserMediaResult()",
|
| kFailedWithPermissionDeniedError,
|
| tab_contents));
|
| - InfoBarService* infobar_service =
|
| - InfoBarService::FromWebContents(tab_contents);
|
| - EXPECT_EQ(0u, infobar_service->infobar_count());
|
| }
|
|
|
| -IN_PROC_BROWSER_TEST_P(MediaStreamPermissionTest,
|
| - DISABLED_TestAcceptIsNotSticky) {
|
| +IN_PROC_BROWSER_TEST_P(MediaStreamPermissionTest, TestAcceptIsNotSticky) {
|
| content::WebContents* tab_contents = LoadTestPageInTab();
|
|
|
| // If accept were sticky the second call would hang because it hangs if an
|
| - // infobar does not pop up.
|
| + // infobar or bubble does not pop up.
|
| EXPECT_TRUE(GetUserMediaAndAccept(tab_contents));
|
| EXPECT_TRUE(GetUserMediaAndAccept(tab_contents));
|
| }
|
|
|
| -IN_PROC_BROWSER_TEST_P(MediaStreamPermissionTest,
|
| - DISABLED_TestDismissIsNotSticky) {
|
| +IN_PROC_BROWSER_TEST_P(MediaStreamPermissionTest, TestDismissIsNotSticky) {
|
| content::WebContents* tab_contents = LoadTestPageInTab();
|
|
|
| // If dismiss were sticky the second call would hang because it hangs if an
|
| - // infobar does not pop up.
|
| + // infobar or bubble does not pop up.
|
| GetUserMediaAndDismiss(tab_contents);
|
| GetUserMediaAndDismiss(tab_contents);
|
| }
|
|
|
| IN_PROC_BROWSER_TEST_P(MediaStreamPermissionTest,
|
| - DISABLED_TestDenyingThenClearingStickyException) {
|
| + TestDenyingThenClearingStickyException) {
|
| content::WebContents* tab_contents = LoadTestPageInTab();
|
|
|
| GetUserMediaAndDeny(tab_contents);
|
| @@ -195,7 +185,7 @@ IN_PROC_BROWSER_TEST_P(MediaStreamPermissionTest,
|
| settings_map->ClearSettingsForOneType(
|
| CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA);
|
|
|
| - // If an infobar is not launched now, this will hang.
|
| + // If an infobar or bubble is not launched now, this will hang.
|
| GetUserMediaAndDeny(tab_contents);
|
| }
|
|
|
| @@ -219,7 +209,7 @@ IN_PROC_BROWSER_TEST_P(MediaStreamPermissionTest,
|
| }
|
|
|
| IN_PROC_BROWSER_TEST_P(MediaStreamPermissionTest,
|
| - DISABLED_DenyingCameraDoesNotCauseStickyDenyForMics) {
|
| + DenyingCameraDoesNotCauseStickyDenyForMics) {
|
| content::WebContents* tab_contents = LoadTestPageInTab();
|
|
|
| // If camera blocking also blocked mics, the second call here would hang.
|
|
|