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

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

Issue 2951713002: RTCPeerConnection.addTrack and removeTrack added (behind flag) (Closed)
Patch Set: Addressed deadbeef's comments Created 3 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/media/webrtc/webrtc_browsertest_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/webrtc/webrtc_browsertest_base.h
diff --git a/chrome/browser/media/webrtc/webrtc_browsertest_base.h b/chrome/browser/media/webrtc/webrtc_browsertest_base.h
index d201fb43f34d89953de753aa7083af8d8b6fc465..5c16feff67f26d07d9283baca27ddc3a0e6387b8 100644
--- a/chrome/browser/media/webrtc/webrtc_browsertest_base.h
+++ b/chrome/browser/media/webrtc/webrtc_browsertest_base.h
@@ -47,6 +47,14 @@ class WebRtcTestBase : public InProcessBrowserTest {
static const char kUseDefaultAudioCodec[];
static const char kUseDefaultVideoCodec[];
+ static const char kUndefined[];
+
+ enum class StreamArgumentType {
+ NO_STREAM,
+ SHARED_STREAM,
+ INDIVIDUAL_STREAMS
+ };
+
protected:
WebRtcTestBase();
~WebRtcTestBase() override;
@@ -198,6 +206,22 @@ class WebRtcTestBase : public InProcessBrowserTest {
void VerifyRtpReceivers(content::WebContents* tab,
base::Optional<size_t> expected_num_tracks =
base::Optional<size_t>()) const;
+ std::vector<std::string> CreateAndAddAudioAndVideoTrack(
+ content::WebContents* tab,
+ StreamArgumentType stream_argument_type) const;
+ void RemoveTrack(content::WebContents* tab,
+ const std::string& track_id) const;
+ bool HasLocalStreamWithTrack(content::WebContents* tab,
+ const std::string& stream_id,
+ const std::string& track_id) const;
+ bool HasRemoteStreamWithTrack(content::WebContents* tab,
+ const std::string& stream_id,
+ const std::string& track_id) const;
+ bool HasSenderWithTrack(content::WebContents* tab,
+ std::string track_id) const;
+ bool HasReceiverWithTrack(content::WebContents* tab,
+ std::string track_id) const;
+ size_t GetNegotiationNeededCount(content::WebContents* tab) const;
private:
void CloseInfoBarInTab(content::WebContents* tab_contents,
@@ -210,6 +234,10 @@ class WebRtcTestBase : public InProcessBrowserTest {
content::WebContents* from_tab) const;
void GatherAndSendIceCandidates(content::WebContents* from_tab,
content::WebContents* to_tab) const;
+ bool HasStreamWithTrack(content::WebContents* tab,
+ const char* function_name,
+ std::string stream_id,
+ std::string track_id) const;
infobars::InfoBar* GetUserMediaAndWaitForInfoBar(
content::WebContents* tab_contents,
« no previous file with comments | « no previous file | chrome/browser/media/webrtc/webrtc_browsertest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698