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

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

Issue 23172002: Landing https://codereview.chromium.org/18769010/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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
« no previous file with comments | « no previous file | chrome/test/data/webrtc/adapter.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/media/webrtc_browsertest_base.h" 5 #include "chrome/browser/media/webrtc_browsertest_base.h"
6 6
7 #include "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/infobars/infobar.h" 8 #include "chrome/browser/infobars/infobar.h"
9 #include "chrome/browser/infobars/infobar_service.h" 9 #include "chrome/browser/infobars/infobar_service.h"
10 #include "chrome/browser/media/media_stream_infobar_delegate.h" 10 #include "chrome/browser/media/media_stream_infobar_delegate.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // A dismiss should be treated like a deny. 74 // A dismiss should be treated like a deny.
75 EXPECT_TRUE(PollingWaitUntil("obtainGetUserMediaResult()", 75 EXPECT_TRUE(PollingWaitUntil("obtainGetUserMediaResult()",
76 kFailedWithErrorPermissionDenied, tab_contents)); 76 kFailedWithErrorPermissionDenied, tab_contents));
77 } 77 }
78 78
79 void WebRtcTestBase::GetUserMedia(content::WebContents* tab_contents, 79 void WebRtcTestBase::GetUserMedia(content::WebContents* tab_contents,
80 const std::string& constraints) { 80 const std::string& constraints) {
81 // Request user media: this will launch the media stream info bar. 81 // Request user media: this will launch the media stream info bar.
82 std::string result; 82 std::string result;
83 EXPECT_TRUE(content::ExecuteScriptAndExtractString( 83 EXPECT_TRUE(content::ExecuteScriptAndExtractString(
84 tab_contents, "getUserMedia(" + constraints + ");", &result)); 84 tab_contents, "doGetUserMedia(" + constraints + ");", &result));
85 EXPECT_EQ("ok-requested", result); 85 EXPECT_EQ("ok-requested", result);
86 } 86 }
87 87
88 MediaStreamInfoBarDelegate* WebRtcTestBase::GetUserMediaAndWaitForInfoBar( 88 MediaStreamInfoBarDelegate* WebRtcTestBase::GetUserMediaAndWaitForInfoBar(
89 content::WebContents* tab_contents, 89 content::WebContents* tab_contents,
90 const std::string& constraints) { 90 const std::string& constraints) {
91 content::WindowedNotificationObserver infobar_added( 91 content::WindowedNotificationObserver infobar_added(
92 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, 92 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED,
93 content::NotificationService::AllSources()); 93 content::NotificationService::AllSources());
94 94
(...skipping 13 matching lines...) Expand all
108 content::WindowedNotificationObserver infobar_removed( 108 content::WindowedNotificationObserver infobar_removed(
109 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, 109 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
110 content::NotificationService::AllSources()); 110 content::NotificationService::AllSources());
111 111
112 InfoBarService* infobar_service = 112 InfoBarService* infobar_service =
113 InfoBarService::FromWebContents(tab_contents); 113 InfoBarService::FromWebContents(tab_contents);
114 infobar_service->RemoveInfoBar(infobar); 114 infobar_service->RemoveInfoBar(infobar);
115 115
116 infobar_removed.Wait(); 116 infobar_removed.Wait();
117 } 117 }
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/webrtc/adapter.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698