| OLD | NEW |
| 1 #!/usr/bin/python | |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 5 | 4 |
| 6 import simplejson as json # found in third_party | 5 import simplejson as json # found in third_party |
| 7 | 6 |
| 8 | 7 |
| 9 class FileBrowser(object): | 8 class FileBrowser(object): |
| 10 """This class provides an API for automating the ChromeOS File Browser. | 9 """This class provides an API for automating the ChromeOS File Browser. |
| 11 | 10 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 167 |
| 169 Returns: | 168 Returns: |
| 170 Whether file manager is initialied. | 169 Whether file manager is initialied. |
| 171 """ | 170 """ |
| 172 def _IsInitialized(): | 171 def _IsInitialized(): |
| 173 script = """ | 172 script = """ |
| 174 pyautoAPI.isInitialized(); | 173 pyautoAPI.isInitialized(); |
| 175 """ | 174 """ |
| 176 return self.executor.Execute(script) | 175 return self.executor.Execute(script) |
| 177 return self._ui_test.WaitUntil(lambda: _IsInitialized()) | 176 return self._ui_test.WaitUntil(lambda: _IsInitialized()) |
| OLD | NEW |