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

Unified Diff: chrome/browser/media/webrtc_browsertest_base.h

Issue 271653002: Rewrote WebRTC browser tests to not use peerconnection_server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit fixes Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
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
index 217e5e3af8b08de66a0c24fe5b6d0f205f872089..acfdb236e162b14caf0b75300c519badefc085ff 100644
--- a/chrome/browser/media/webrtc_browsertest_base.h
+++ b/chrome/browser/media/webrtc_browsertest_base.h
@@ -74,18 +74,23 @@ class WebRtcTestBase : public InProcessBrowserTest {
// Closes the last local stream acquired by the GetUserMedia* methods.
void CloseLastLocalStream(content::WebContents* tab_contents) const;
- void ConnectToPeerConnectionServer(const std::string& peer_name,
- content::WebContents* tab_contents) const;
std::string ExecuteJavascript(const std::string& javascript,
content::WebContents* tab_contents) const;
- void EstablishCall(content::WebContents* from_tab,
+ // Sets up a peer connection in the tab and adds the current local stream
+ // (which you can prepare by calling one of the GetUserMedia* methods above).
+ void SetupPeerconnectionWithLocalStream(content::WebContents* tab) const;
+
+ // Exchanges offers and answers between the peer connections in the
+ // respective tabs. Before calling this, you must have prepared peer
+ // connections in both tabs and configured them as you like (for instance by
+ // calling SetupPeerconnectionWithLocalStream).
+ void NegotiateCall(content::WebContents* from_tab,
content::WebContents* to_tab) const;
+ // Hangs up a negotiated call.
void HangUp(content::WebContents* from_tab) const;
- void WaitUntilHangupVerified(content::WebContents* tab_contents) const;
-
// Call this to enable monitoring of javascript errors for this test method.
// This will only work if the tests are run sequentially by the test runner
// (i.e. with --test-launcher-developer-mode or --test-launcher-jobs=1).
@@ -108,6 +113,14 @@ class WebRtcTestBase : public InProcessBrowserTest {
private:
void CloseInfoBarInTab(content::WebContents* tab_contents,
infobars::InfoBar* infobar) const;
+
+ std::string CreateLocalOffer(content::WebContents* from_tab) const;
+ std::string CreateAnswer(std::string local_offer,
+ content::WebContents* to_tab) const;
+ void ReceiveAnswer(std::string answer, content::WebContents* from_tab) const;
+ void GatherAndSendIceCandidates(content::WebContents* from_tab,
+ content::WebContents* to_tab) const;
+
infobars::InfoBar* GetUserMediaAndWaitForInfoBar(
content::WebContents* tab_contents,
const std::string& constraints) const;
« no previous file with comments | « chrome/browser/media/chrome_webrtc_video_quality_browsertest.cc ('k') | chrome/browser/media/webrtc_browsertest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698