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

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

Issue 10696115: Add test to verify we can cancel the GetUserMedia request right after sending the request (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: chrome/test/functional/webrtc_call.py
diff --git a/chrome/test/functional/webrtc_call.py b/chrome/test/functional/webrtc_call.py
index 68eec9ed2ceca4bdd09b2deaa2111123dce87dcf..bb431e2a8b81c7b33a779eaba42c9139e35ddaab 100755
--- a/chrome/test/functional/webrtc_call.py
+++ b/chrome/test/functional/webrtc_call.py
@@ -144,6 +144,18 @@ class WebRTCCallTest(pyauto.PyUITest):
self.assertEquals('failed-with-error-1',
self._GetUserMedia(tab_index=0, action='dismiss'))
+ def testCancelGetUserMediaRequest(self):
phoglund_chromium 2012/07/04 14:20:58 The first line in the docstring must not have any
no longer working on chromium 2012/07/05 14:05:19 Done.
+ """Ensures the browser does not crash when cancelling a pending GetUserMedia
+ request. See issue 135043."""
+
+ url = self.GetFileURLForDataPath('webrtc', 'webrtc_jsep_test.html')
+ self.NavigateToURL(url)
+ self.AppendTab(pyauto.GURL(url))
phoglund_chromium 2012/07/04 14:20:58 You did reproduce the crash with the test, right?
no longer working on chromium 2012/07/05 14:05:19 Thanks for pointing this out. I just double checke
+ self.assertEquals('ok-requested', self.ExecuteJavascript(
+ 'getUserMedia(true, true)', tab_index=0))
+ self.assertEquals('ok-calceled-request', self.ExecuteJavascript(
+ 'CancelGetUserMediaRequest()', tab_index=0))
+
def _GetUserMedia(self, tab_index, action='allow'):
"""Acquires webcam or mic for one tab and returns the result."""
self.assertEquals('ok-requested', self.ExecuteJavascript(
« chrome/test/data/webrtc/getusermedia.js ('K') | « chrome/test/data/webrtc/getusermedia.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698