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

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

Issue 10832084: Fixed race condition in media_stream_infobar.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added docstrings Created 8 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 | « chrome/test/functional/media_stream_infobar.py ('k') | chrome/test/functional/webrtc_test_base.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/webrtc_call.py
diff --git a/chrome/test/functional/webrtc_call.py b/chrome/test/functional/webrtc_call.py
index 4c1db7e201a80c5fc4ee7752143603c2c549b3ec..58eed1dcff58814b52fe17a9610479b8f855405d 100755
--- a/chrome/test/functional/webrtc_call.py
+++ b/chrome/test/functional/webrtc_call.py
@@ -5,18 +5,16 @@
import os
import subprocess
-import time
-import unittest
import pyauto_functional
import pyauto
-
+import webrtc_test_base
class MissingRequiredBinaryException(Exception):
pass
-class WebRTCCallTest(pyauto.PyUITest):
+class WebRTCCallTest(webrtc_test_base.WebrtcTestBase):
"""Test we can set up a WebRTC call and disconnect it.
Prerequisites: This test case must run on a machine with a webcam, either
@@ -149,9 +147,9 @@ class WebRTCCallTest(pyauto.PyUITest):
self.WaitForInfobarCount(1, tab_index=tab_index)
self.PerformActionOnInfobar(action, infobar_index=0, tab_index=tab_index)
- self._WaitForGetUserMediaResult(tab_index=0)
+ self.WaitForGetUserMediaResult(tab_index=0)
- result = self._GetUserMediaResult(tab_index=0)
+ result = self.GetUserMediaResult(tab_index=0)
self._AssertNoFailures(tab_index)
return result
@@ -184,16 +182,6 @@ class WebRTCCallTest(pyauto.PyUITest):
self.assertEquals('ok-disconnected', self.ExecuteJavascript(
'disconnect()', tab_index=tab_index))
- def _WaitForGetUserMediaResult(self, tab_index):
- def HasResult():
- return self._GetUserMediaResult(tab_index) != 'not-called-yet'
- self.assertTrue(self.WaitUntil(HasResult),
- msg='Timed out while waiting for getUserMedia callback.')
-
- def _GetUserMediaResult(self, tab_index):
- return self.ExecuteJavascript(
- 'obtainGetUserMediaResult()', tab_index=tab_index)
-
def _StartDetectingVideo(self, tab_index, video_element):
self.assertEquals('ok-started', self.ExecuteJavascript(
'startDetection("%s", "frame_buffer", 320, 240)' % video_element,
« no previous file with comments | « chrome/test/functional/media_stream_infobar.py ('k') | chrome/test/functional/webrtc_test_base.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698