Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/usr/bin/env python | |
| 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 | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 import pyauto | |
| 7 | |
| 8 | |
| 9 class WebrtcTestBase(pyauto.PyUITest): | |
| 10 """This base class provides helpers for getUserMedia calls.""" | |
| 11 | |
| 12 def WaitForGetUserMediaResult(self, tab_index): | |
|
Nirnimesh
2012/08/01 11:18:19
docstring please
| |
| 13 def HasResult(): | |
| 14 return self.GetUserMediaResult(tab_index) != 'not-called-yet' | |
| 15 self.assertTrue(self.WaitUntil(HasResult), | |
| 16 msg='Timed out while waiting for getUserMedia callback.') | |
| 17 | |
| 18 def GetUserMediaResult(self, tab_index): | |
| 19 return self.ExecuteJavascript( | |
| 20 'obtainGetUserMediaResult()', tab_index=tab_index) | |
| OLD | NEW |