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

Side by Side Diff: chrome/test/functional/media_stream_infobar.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, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/test/functional/webrtc_call.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import pyauto_functional 6 import pyauto_functional
7 import pyauto 7 import pyauto
8 import webrtc_test_base
8 9
9 10
10 class MediaStreamInfobarTest(pyauto.PyUITest): 11 class MediaStreamInfobarTest(webrtc_test_base.WebrtcTestBase):
11 """Performs basic tests on the media stream infobar. 12 """Performs basic tests on the media stream infobar.
12 13
13 This infobar is used to grant or deny access to WebRTC capabilities for a 14 This infobar is used to grant or deny access to WebRTC capabilities for a
14 webpage. If a page calls the getUserMedia function the infobar will ask the 15 webpage. If a page calls the getUserMedia function the infobar will ask the
15 user if it is OK for the webpage to use the webcam or microphone on the user's 16 user if it is OK for the webpage to use the webcam or microphone on the user's
16 machine. These tests ensure that the infobar works as intended. 17 machine. These tests ensure that the infobar works as intended.
17 """ 18 """
18 19
19 def ExtraChromeFlags(self): 20 def ExtraChromeFlags(self):
20 """Adds flags to the Chrome command line.""" 21 """Adds flags to the Chrome command line."""
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 def _TestGetUserMedia(self, with_action): 67 def _TestGetUserMedia(self, with_action):
67 """Runs getUserMedia in the test page and returns the result.""" 68 """Runs getUserMedia in the test page and returns the result."""
68 url = self.GetFileURLForDataPath('webrtc', 'webrtc_jsep_test.html') 69 url = self.GetFileURLForDataPath('webrtc', 'webrtc_jsep_test.html')
69 self.NavigateToURL(url) 70 self.NavigateToURL(url)
70 71
71 self.assertEquals('ok-requested', self.ExecuteJavascript( 72 self.assertEquals('ok-requested', self.ExecuteJavascript(
72 'getUserMedia(true, true)')) 73 'getUserMedia(true, true)'))
73 74
74 self.WaitForInfobarCount(1) 75 self.WaitForInfobarCount(1)
75 self.PerformActionOnInfobar(with_action, infobar_index=0) 76 self.PerformActionOnInfobar(with_action, infobar_index=0)
77 self.WaitForGetUserMediaResult(tab_index=0)
76 78
77 return self.ExecuteJavascript('obtainGetUserMediaResult()') 79 return self.GetUserMediaResult(tab_index=0)
78 80
79 81
80 if __name__ == '__main__': 82 if __name__ == '__main__':
81 pyauto_functional.Main() 83 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « no previous file | chrome/test/functional/webrtc_call.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698