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

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

Issue 211273007: Split InfoBarService core code into InfoBarManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + comments Created 6 years, 8 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/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"
11 #include "chrome/browser/infobars/infobar.h" 11 #include "chrome/browser/infobars/infobar.h"
12 #include "chrome/browser/infobars/infobar_manager.h"
12 #include "chrome/browser/infobars/infobar_service.h" 13 #include "chrome/browser/infobars/infobar_service.h"
13 #include "chrome/browser/media/webrtc_browsertest_base.h" 14 #include "chrome/browser/media/webrtc_browsertest_base.h"
14 #include "chrome/browser/media/webrtc_browsertest_common.h" 15 #include "chrome/browser/media/webrtc_browsertest_common.h"
15 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/ui/browser.h" 17 #include "chrome/browser/ui/browser.h"
17 #include "chrome/browser/ui/browser_tabstrip.h" 18 #include "chrome/browser/ui/browser_tabstrip.h"
18 #include "chrome/browser/ui/tabs/tab_strip_model.h" 19 #include "chrome/browser/ui/tabs/tab_strip_model.h"
19 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
20 #include "chrome/common/content_settings_types.h" 21 #include "chrome/common/content_settings_types.h"
21 #include "chrome/test/base/in_process_browser_test.h" 22 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 content::WebContents* tab_contents = LoadTestPageInTab(); 116 content::WebContents* tab_contents = LoadTestPageInTab();
116 117
117 GetUserMediaAndAccept(tab_contents); 118 GetUserMediaAndAccept(tab_contents);
118 GetUserMediaAndDeny(tab_contents); 119 GetUserMediaAndDeny(tab_contents);
119 120
120 // Should fail with permission denied right away with no infobar popping up. 121 // Should fail with permission denied right away with no infobar popping up.
121 GetUserMedia(tab_contents, kAudioVideoCallConstraints); 122 GetUserMedia(tab_contents, kAudioVideoCallConstraints);
122 EXPECT_TRUE(test::PollingWaitUntil("obtainGetUserMediaResult()", 123 EXPECT_TRUE(test::PollingWaitUntil("obtainGetUserMediaResult()",
123 kFailedWithPermissionDeniedError, 124 kFailedWithPermissionDeniedError,
124 tab_contents)); 125 tab_contents));
125 InfoBarService* infobar_service = 126 InfoBarManager* infobar_manager =
126 InfoBarService::FromWebContents(tab_contents); 127 InfoBarService::FromWebContents(tab_contents)->infobar_manager();
127 EXPECT_EQ(0u, infobar_service->infobar_count()); 128 EXPECT_EQ(0u, infobar_manager->infobar_count());
128 } 129 }
129 130
130 // Failing on Win Aura, so disabling on that. 131 // Failing on Win Aura, so disabling on that.
131 // See http://crbug.com/263333. 132 // See http://crbug.com/263333.
132 #if defined(USE_AURA) 133 #if defined(USE_AURA)
133 #define MAYBE_TestAcceptIsNotSticky DISABLED_TestAcceptIsNotSticky 134 #define MAYBE_TestAcceptIsNotSticky DISABLED_TestAcceptIsNotSticky
134 #else 135 #else
135 #define MAYBE_TestAcceptIsNotSticky TestAcceptIsNotSticky 136 #define MAYBE_TestAcceptIsNotSticky TestAcceptIsNotSticky
136 #endif 137 #endif
137 IN_PROC_BROWSER_TEST_F(MediaStreamInfoBarTest, MAYBE_TestAcceptIsNotSticky) { 138 IN_PROC_BROWSER_TEST_F(MediaStreamInfoBarTest, MAYBE_TestAcceptIsNotSticky) {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 IN_PROC_BROWSER_TEST_F(MediaStreamInfoBarTest, 199 IN_PROC_BROWSER_TEST_F(MediaStreamInfoBarTest,
199 MAYBE_DenyingCameraDoesNotCauseStickyDenyForMics) { 200 MAYBE_DenyingCameraDoesNotCauseStickyDenyForMics) {
200 content::WebContents* tab_contents = LoadTestPageInTab(); 201 content::WebContents* tab_contents = LoadTestPageInTab();
201 202
202 // If camera blocking also blocked mics, the second call here would hang. 203 // If camera blocking also blocked mics, the second call here would hang.
203 GetUserMediaWithSpecificConstraintsAndDeny(tab_contents, 204 GetUserMediaWithSpecificConstraintsAndDeny(tab_contents,
204 kVideoOnlyCallConstraints); 205 kVideoOnlyCallConstraints);
205 GetUserMediaWithSpecificConstraintsAndAccept(tab_contents, 206 GetUserMediaWithSpecificConstraintsAndAccept(tab_contents,
206 kAudioOnlyCallConstraints); 207 kAudioOnlyCallConstraints);
207 } 208 }
OLDNEW
« no previous file with comments | « chrome/browser/managed_mode/managed_mode_navigation_observer.cc ('k') | chrome/browser/media/media_stream_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698