| OLD | NEW |
| 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/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/content_settings/host_content_settings_map.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 return; | 112 return; |
| 113 #endif | 113 #endif |
| 114 | 114 |
| 115 content::WebContents* tab_contents = LoadTestPageInTab(); | 115 content::WebContents* tab_contents = LoadTestPageInTab(); |
| 116 | 116 |
| 117 GetUserMediaAndAccept(tab_contents); | 117 GetUserMediaAndAccept(tab_contents); |
| 118 GetUserMediaAndDeny(tab_contents); | 118 GetUserMediaAndDeny(tab_contents); |
| 119 | 119 |
| 120 // Should fail with permission denied right away with no infobar popping up. | 120 // Should fail with permission denied right away with no infobar popping up. |
| 121 GetUserMedia(tab_contents, kAudioVideoCallConstraints); | 121 GetUserMedia(tab_contents, kAudioVideoCallConstraints); |
| 122 EXPECT_TRUE(test::PollingWaitUntil("obtainGetUserMediaResult()", | 122 EXPECT_TRUE(PollingWaitUntil("obtainGetUserMediaResult()", |
| 123 kFailedWithPermissionDeniedError, | 123 kFailedWithPermissionDeniedError, |
| 124 tab_contents)); | 124 tab_contents)); |
| 125 InfoBarService* infobar_service = | 125 InfoBarService* infobar_service = |
| 126 InfoBarService::FromWebContents(tab_contents); | 126 InfoBarService::FromWebContents(tab_contents); |
| 127 EXPECT_EQ(0u, infobar_service->infobar_count()); | 127 EXPECT_EQ(0u, infobar_service->infobar_count()); |
| 128 } | 128 } |
| 129 | 129 |
| 130 // Failing on Win Aura, so disabling on that. | 130 // Failing on Win Aura, so disabling on that. |
| 131 // See http://crbug.com/263333. | 131 // See http://crbug.com/263333. |
| 132 #if defined(USE_AURA) | 132 #if defined(USE_AURA) |
| 133 #define MAYBE_TestAcceptIsNotSticky DISABLED_TestAcceptIsNotSticky | 133 #define MAYBE_TestAcceptIsNotSticky DISABLED_TestAcceptIsNotSticky |
| 134 #else | 134 #else |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 IN_PROC_BROWSER_TEST_F(MediaStreamInfoBarTest, | 198 IN_PROC_BROWSER_TEST_F(MediaStreamInfoBarTest, |
| 199 MAYBE_DenyingCameraDoesNotCauseStickyDenyForMics) { | 199 MAYBE_DenyingCameraDoesNotCauseStickyDenyForMics) { |
| 200 content::WebContents* tab_contents = LoadTestPageInTab(); | 200 content::WebContents* tab_contents = LoadTestPageInTab(); |
| 201 | 201 |
| 202 // If camera blocking also blocked mics, the second call here would hang. | 202 // If camera blocking also blocked mics, the second call here would hang. |
| 203 GetUserMediaWithSpecificConstraintsAndDeny(tab_contents, | 203 GetUserMediaWithSpecificConstraintsAndDeny(tab_contents, |
| 204 kVideoOnlyCallConstraints); | 204 kVideoOnlyCallConstraints); |
| 205 GetUserMediaWithSpecificConstraintsAndAccept(tab_contents, | 205 GetUserMediaWithSpecificConstraintsAndAccept(tab_contents, |
| 206 kAudioOnlyCallConstraints); | 206 kAudioOnlyCallConstraints); |
| 207 } | 207 } |
| OLD | NEW |