| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
| 7 #include "content/browser/web_contents/web_contents_impl.h" | 7 #include "content/browser/web_contents/web_contents_impl.h" |
| 8 #include "content/public/common/content_switches.h" | 8 #include "content/public/common/content_switches.h" |
| 9 #include "content/public/test/browser_test_utils.h" | 9 #include "content/public/test/browser_test_utils.h" |
| 10 #include "content/shell/shell.h" | 10 #include "content/shell/shell.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // MSID. http://tools.ietf.org/html/draft-alvestrand-rtcweb-msid-02 | 85 // MSID. http://tools.ietf.org/html/draft-alvestrand-rtcweb-msid-02 |
| 86 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, | 86 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, |
| 87 CanSetupAudioAndVideoCallWithoutMsidAndBundle) { | 87 CanSetupAudioAndVideoCallWithoutMsidAndBundle) { |
| 88 GURL url(test_server()->GetURL("files/media/peerconnection-call.html")); | 88 GURL url(test_server()->GetURL("files/media/peerconnection-call.html")); |
| 89 NavigateToURL(shell(), url); | 89 NavigateToURL(shell(), url); |
| 90 | 90 |
| 91 EXPECT_TRUE(ExecuteJavascript("callWithoutMsidAndBundle();")); | 91 EXPECT_TRUE(ExecuteJavascript("callWithoutMsidAndBundle();")); |
| 92 ExpectTitle("OK"); | 92 ExpectTitle("OK"); |
| 93 } | 93 } |
| 94 | 94 |
| 95 // This test will make a PeerConnection-based call and test an unreliable text |
| 96 // dataChannel. |
| 97 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallWithDataOnly) { |
| 98 CommandLine::ForCurrentProcess()->AppendSwitch(switches::kEnableDataChannels); |
| 99 |
| 100 GURL url(test_server()->GetURL("files/media/peerconnection-call.html")); |
| 101 NavigateToURL(shell(), url); |
| 102 |
| 103 EXPECT_TRUE(ExecuteJavascript("callWithDataOnly();")); |
| 104 ExpectTitle("OK"); |
| 105 } |
| 106 |
| 107 // This test will make a PeerConnection-based call and test an unreliable text |
| 108 // dataChannel and audio and video tracks. |
| 109 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallWithDataAndMedia) { |
| 110 CommandLine::ForCurrentProcess()->AppendSwitch(switches::kEnableDataChannels); |
| 111 |
| 112 GURL url(test_server()->GetURL("files/media/peerconnection-call.html")); |
| 113 NavigateToURL(shell(), url); |
| 114 |
| 115 EXPECT_TRUE(ExecuteJavascript("callWithDataAndMedia();")); |
| 116 ExpectTitle("OK"); |
| 117 } |
| 118 |
| 119 // This test will make a PeerConnection-based call and test an unreliable text |
| 120 // dataChannel and later add an audio and video track. |
| 121 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallWithDataAndLaterAddMedia) { |
| 122 CommandLine::ForCurrentProcess()->AppendSwitch(switches::kEnableDataChannels); |
| 123 |
| 124 GURL url(test_server()->GetURL("files/media/peerconnection-call.html")); |
| 125 NavigateToURL(shell(), url); |
| 126 |
| 127 EXPECT_TRUE(ExecuteJavascript("callWithDataAndLaterAddMedia();")); |
| 128 ExpectTitle("OK"); |
| 129 } |
| 130 |
| 95 } // namespace content | 131 } // namespace content |
| 96 | 132 |
| OLD | NEW |