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

Unified Diff: content/browser/media/webrtc_browsertest.cc

Issue 11785041: Add content browser tests for PeerConnection DataChannels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved to content/browser/media and added OWNERS files. Created 7 years, 11 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 | « content/browser/media/OWNERS ('k') | content/browser/webrtc_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/webrtc_browsertest.cc
diff --git a/content/browser/webrtc_browsertest.cc b/content/browser/media/webrtc_browsertest.cc
similarity index 72%
rename from content/browser/webrtc_browsertest.cc
rename to content/browser/media/webrtc_browsertest.cc
index 2343e0aa1f8e61a412453d3a6fbddaa537a562a6..ddceb034eb48b6711f2b74969ed241b9d4583037 100644
--- a/content/browser/webrtc_browsertest.cc
+++ b/content/browser/media/webrtc_browsertest.cc
@@ -92,5 +92,41 @@ IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest,
ExpectTitle("OK");
}
+// This test will make a PeerConnection-based call and test an unreliable text
+// dataChannel.
+IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallWithDataOnly) {
+ CommandLine::ForCurrentProcess()->AppendSwitch(switches::kEnableDataChannels);
+
+ GURL url(test_server()->GetURL("files/media/peerconnection-call.html"));
+ NavigateToURL(shell(), url);
+
+ EXPECT_TRUE(ExecuteJavascript("callWithDataOnly();"));
+ ExpectTitle("OK");
+}
+
+// This test will make a PeerConnection-based call and test an unreliable text
+// dataChannel and audio and video tracks.
+IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallWithDataAndMedia) {
+ CommandLine::ForCurrentProcess()->AppendSwitch(switches::kEnableDataChannels);
+
+ GURL url(test_server()->GetURL("files/media/peerconnection-call.html"));
+ NavigateToURL(shell(), url);
+
+ EXPECT_TRUE(ExecuteJavascript("callWithDataAndMedia();"));
+ ExpectTitle("OK");
+}
+
+// This test will make a PeerConnection-based call and test an unreliable text
+// dataChannel and later add an audio and video track.
+IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallWithDataAndLaterAddMedia) {
+ CommandLine::ForCurrentProcess()->AppendSwitch(switches::kEnableDataChannels);
+
+ GURL url(test_server()->GetURL("files/media/peerconnection-call.html"));
+ NavigateToURL(shell(), url);
+
+ EXPECT_TRUE(ExecuteJavascript("callWithDataAndLaterAddMedia();"));
+ ExpectTitle("OK");
+}
+
} // namespace content
« no previous file with comments | « content/browser/media/OWNERS ('k') | content/browser/webrtc_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698