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

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

Issue 20247003: Introduced base class for WebRTC browser tests, cleaned up duplication. (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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_
6 #define CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_
7
8 #include "chrome/test/base/in_process_browser_test.h"
9
10 namespace content {
11 class WebContents;
12 }
13
14 class MediaStreamInfoBarDelegate;
15
16 // Base class for WebRTC browser tests with useful primitives for interacting
17 // getUserMedia. We use inheritance here because it makes the test code look
18 // as clean as it can be.
19 class WebRtcTestBase : public InProcessBrowserTest {
20 public:
21 // Typical constraints.
22 static const char kAudioVideoCallConstraints[];
23 static const char kAudioOnlyCallConstraints[];
24 static const char kVideoOnlyCallConstraints[];
25
26 static const char kFailedWithErrorPermissionDenied[];
27 static const char kOkGotStream[];
28
29 protected:
30 MediaStreamInfoBarDelegate* GetUserMediaAndWaitForInfobar(
31 content::WebContents* tab_contents,
32 const std::string& constraints);
33 void CloseInfobarInTab(content::WebContents* tab_contents,
34 MediaStreamInfoBarDelegate* infobar);
35 void GetUserMediaAndAccept(content::WebContents* tab_contents);
36 void GetUserMediaWithSpecificConstraintsAndAccept(
37 content::WebContents* tab_contents, const std::string& constraints);
38 void GetUserMediaAndDeny(content::WebContents* tab_contents);
39 void GetUserMediaWithSpecificConstraintsAndDeny(
40 content::WebContents* tab_contents, const std::string& constraints);
41 void GetUserMediaAndDismiss(content::WebContents* tab_contents);
42 void GetUserMedia(content::WebContents* tab_contents,
43 const std::string& constraints);
44 };
45
46 #endif // CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/media_stream_infobar_delegate.h ('k') | chrome/browser/media/webrtc_browsertest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698