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

Unified Diff: chrome/test/functional/webrtc_apprtc_call.py

Issue 11648013: Added tab-to-tab apprtc call. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added clarifying comment. Created 7 years, 12 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/webrtc_apprtc_call.py
diff --git a/chrome/test/functional/webrtc_apprtc_call.py b/chrome/test/functional/webrtc_apprtc_call.py
index 477399b0fabee71bba3c196a6afb9df3fc7312ae..73985a14276102f954ffb7a2de7d7d9b3d417a25 100755
--- a/chrome/test/functional/webrtc_apprtc_call.py
+++ b/chrome/test/functional/webrtc_apprtc_call.py
@@ -3,6 +3,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import random
+
# Note: pyauto_functional must come before pyauto.
import pyauto_functional
import pyauto
@@ -25,13 +27,31 @@ class WebrtcApprtcCallTest(webrtc_test_base.WebrtcTestBase):
self.assertEquals('', self.CheckErrorsAndCrashes(),
'Chrome crashed or hit a critical error during test.')
- def testApprtcLoopbackVideoAudioCall(self):
+ def testApprtcLoopbackCall(self):
self.NavigateToURL('http://apprtc.appspot.com/?debug=loopback')
self.WaitForInfobarCount(1, tab_index=0)
self.PerformActionOnInfobar('accept', infobar_index=0, tab_index=0)
self._WaitForCallEstablishment(tab_index=0)
+ def testApprtcTabToTabCall(self):
+ # Randomize the call session id. If we would use the same id we would risk
+ # getting problems with hung calls and lingering state in AppRTC.
+ random_call_id = 'pyauto%d' % random.randint(0, 65536)
+ apprtc_url = 'http://apprtc.appspot.com/?r=%s' % random_call_id
+
+ self.NavigateToURL(apprtc_url)
+ self.AppendTab(pyauto.GURL(apprtc_url))
+
+ self.WaitForInfobarCount(1, tab_index=0)
+ self.WaitForInfobarCount(1, tab_index=1)
+
+ self.PerformActionOnInfobar('accept', infobar_index=0, tab_index=0)
+ self.PerformActionOnInfobar('accept', infobar_index=0, tab_index=1)
+
+ self._WaitForCallEstablishment(tab_index=0)
+ self._WaitForCallEstablishment(tab_index=1)
+
def _WaitForCallEstablishment(self, tab_index):
# AppRTC will set opacity to 1 for remote video when the call is up.
video_playing = self.WaitUntil(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698