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 | |
|
Nirnimesh
2012/07/31 20:10:09
need another blank line here
phoglund_chromium
2012/08/01 07:08:39
Done.
| |
| 8 class WebrtcTestBase(pyauto.PyUITest): | |
| 9 """This base class provides helpers for getUserMedia calls.""" | |
| 10 | |
| 11 def _WaitForGetUserMediaResult(self, tab_index): | |
|
Nirnimesh
2012/07/31 20:10:09
Public methods should not have _ prefix
phoglund_chromium
2012/08/01 07:08:39
Done.
| |
| 12 def HasResult(): | |
| 13 return self._GetUserMediaResult(tab_index) != 'not-called-yet' | |
| 14 self.assertTrue(self.WaitUntil(HasResult), | |
| 15 msg='Timed out while waiting for getUserMedia callback.') | |
| 16 | |
| 17 def _GetUserMediaResult(self, tab_index): | |
| 18 return self.ExecuteJavascript( | |
| 19 'obtainGetUserMediaResult()', tab_index=tab_index) | |
| OLD | NEW |