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

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: addressed Patrik's comments. 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..b826838f3a6d517cea376d5f8046a3d3ef3b2ba3 100755
--- a/chrome/test/functional/webrtc_call.py
+++ b/chrome/test/functional/webrtc_call.py
@@ -144,6 +144,22 @@ class WebRTCCallTest(pyauto.PyUITest):
self.assertEquals('failed-with-error-1',
self._GetUserMedia(tab_index=0, action='dismiss'))
+ def testReloadPageAfterGetUserMedia(self):
+ """Ensures no crash on a quick reaload after GetUserMedia.
+
+ This test will quickly reload the page after running getUserMedia, which
+ will remove the pending request. This crashed the browser before the fix
+ for crbug.com/135043.
+ """
+
+ url = self.GetFileURLForDataPath('webrtc', 'webrtc_jsep_test.html')
+ self.NavigateToURL(url)
+ self.AppendTab(pyauto.GURL(url))
+ self.assertEquals('ok-requested', self.ExecuteJavascript(
+ 'getUserMedia(true, true)', tab_index=0))
+ self.assertEquals('ok-reloaded-page', self.ExecuteJavascript(
Nirnimesh 2012/07/12 14:07:01 You don't need javascript to reload the page. You
+ 'ReloadWebPage()', 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