OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 # 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 |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import logging, os, re, string, time | 5 import logging, os, re, string, time |
6 from autotest_lib.client.bin import test, utils | 6 from autotest_lib.client.bin import utils |
7 from autotest_lib.client.common_lib import error | 7 from autotest_lib.client.common_lib import error |
8 from autotest_lib.client.cros import ui, ui_test | 8 from autotest_lib.client.cros import cros_ui_test, ui |
9 | 9 |
10 class desktopui_IBusTest(ui_test.UITest): | 10 class desktopui_IBusTest(cros_ui_test.UITest): |
11 version = 1 | 11 version = 1 |
12 preserve_srcdir = True | 12 preserve_srcdir = True |
13 | 13 |
14 def setup(self): | 14 def setup(self): |
15 self._ibus_job = None | 15 self._ibus_job = None |
16 self._candidate_window_job = None | 16 self._candidate_window_job = None |
17 self.job.setup_dep(['ibusclient']) | 17 self.job.setup_dep(['ibusclient']) |
18 | 18 |
19 | 19 |
20 def run_ibusclient(self, options): | 20 def run_ibusclient(self, options): |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 "/usr/bin/ibus-daemon --panel=disable --cache=none --restart") | 277 "/usr/bin/ibus-daemon --panel=disable --cache=none --restart") |
278 time.sleep(2) | 278 time.sleep(2) |
279 self._candidate_window_job = utils.BgJob( | 279 self._candidate_window_job = utils.BgJob( |
280 "su chronos -c '/opt/google/chrome/candidate_window'") | 280 "su chronos -c '/opt/google/chrome/candidate_window'") |
281 start_time = time.time() | 281 start_time = time.time() |
282 while time.time() - start_time < timeout: | 282 while time.time() - start_time < timeout: |
283 if os.system('pgrep ^ibus-daemon$') == 0: | 283 if os.system('pgrep ^ibus-daemon$') == 0: |
284 return | 284 return |
285 time.sleep(1) | 285 time.sleep(1) |
286 raise error.TestFail('ibus-daemon is not running') | 286 raise error.TestFail('ibus-daemon is not running') |
OLD | NEW |