Index: chrome/browser/media/webrtc_browsertest_base.h |
diff --git a/chrome/browser/media/webrtc_browsertest_base.h b/chrome/browser/media/webrtc_browsertest_base.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ed86df7617c3fc1f600e1270f62720bf8d66bbee |
--- /dev/null |
+++ b/chrome/browser/media/webrtc_browsertest_base.h |
@@ -0,0 +1,45 @@ |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_ |
+#define CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_ |
+ |
+#include "chrome/test/base/in_process_browser_test.h" |
+ |
+namespace content { |
+class WebContents; |
+} |
+ |
+class MediaStreamInfoBarDelegate; |
+ |
+// 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.
|
+extern const char kAudioVideoCallConstraints[]; |
+extern const char kAudioOnlyCallConstraints[]; |
+extern const char kVideoOnlyCallConstraints[]; |
+ |
+extern const char kFailedWithErrorPermissionDenied[]; |
+extern const char kOkGotStream[]; |
+ |
+// Base class for WebRTC browser tests with useful primitives for interacting |
+// getUserMedia. We use inheritance here because it makes the test code look |
+// as clean as it can be. |
+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
|
+ protected: |
+ MediaStreamInfoBarDelegate* GetUserMediaAndWaitForInfobar( |
+ content::WebContents* tab_contents, |
+ const std::string& constraints); |
+ void CloseInfobarInTab(content::WebContents* tab_contents, |
+ MediaStreamInfoBarDelegate* infobar); |
+ void GetUserMediaAndAccept(content::WebContents* tab_contents); |
+ void GetUserMediaWithSpecificConstraintsAndAccept( |
+ content::WebContents* tab_contents, const std::string& constraints); |
+ void GetUserMediaAndDeny(content::WebContents* tab_contents); |
+ void GetUserMediaWithSpecificConstraintsAndDeny( |
+ content::WebContents* tab_contents, const std::string& constraints); |
+ void GetUserMediaAndDismiss(content::WebContents* tab_contents); |
+ void GetUserMedia(content::WebContents* tab_contents, |
+ const std::string& constraints); |
+}; |
+ |
+#endif // CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_ |