OLD | NEW |
---|---|
(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 // Typical constraints. | |
tommi (sloooow) - chröme
2013/07/25 14:09:09
can these be static members of WebrtcTestBase?
phoglund_chromium
2013/07/25 15:22:46
Done.
| |
17 extern const char kAudioVideoCallConstraints[]; | |
18 extern const char kAudioOnlyCallConstraints[]; | |
19 extern const char kVideoOnlyCallConstraints[]; | |
20 | |
21 extern const char kFailedWithErrorPermissionDenied[]; | |
22 extern const char kOkGotStream[]; | |
23 | |
24 // Base class for WebRTC browser tests with useful primitives for interacting | |
25 // getUserMedia. We use inheritance here because it makes the test code look | |
26 // as clean as it can be. | |
27 class WebrtcTestBase : public InProcessBrowserTest { | |
tommi (sloooow) - chröme
2013/07/25 14:09:09
WebRtcTestBase or WebRTCTestBase. It seems we use
phoglund_chromium
2013/07/25 15:22:46
Hm. For the tests we are currently using Webrtc, l
| |
28 protected: | |
29 MediaStreamInfoBarDelegate* GetUserMediaAndWaitForInfobar( | |
30 content::WebContents* tab_contents, | |
31 const std::string& constraints); | |
32 void CloseInfobarInTab(content::WebContents* tab_contents, | |
33 MediaStreamInfoBarDelegate* infobar); | |
34 void GetUserMediaAndAccept(content::WebContents* tab_contents); | |
35 void GetUserMediaWithSpecificConstraintsAndAccept( | |
36 content::WebContents* tab_contents, const std::string& constraints); | |
37 void GetUserMediaAndDeny(content::WebContents* tab_contents); | |
38 void GetUserMediaWithSpecificConstraintsAndDeny( | |
39 content::WebContents* tab_contents, const std::string& constraints); | |
40 void GetUserMediaAndDismiss(content::WebContents* tab_contents); | |
41 void GetUserMedia(content::WebContents* tab_contents, | |
42 const std::string& constraints); | |
43 }; | |
44 | |
45 #endif // CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_ | |
OLD | NEW |