| 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 os, string, time, gtk | 5 import os, string, time, gtk |
| 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 httpd, ui, ui_test | 8 from autotest_lib.client.cros import cros_ui_test, httpd |
| 9 | 9 |
| 10 class desktopui_ImeTest(ui_test.UITest): | 10 class desktopui_ImeTest(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 # TODO: We shouldn't use ibusclient, we should talk to Chrome directly | 15 # TODO: We shouldn't use ibusclient, we should talk to Chrome directly |
| 16 self.job.setup_dep(['ibusclient']) | 16 self.job.setup_dep(['ibusclient']) |
| 17 | 17 |
| 18 def initialize(self, creds='$default'): | 18 def initialize(self, creds='$default'): |
| 19 self._test_url = 'http://127.0.0.1:8000/interaction_form.html' | 19 self._test_url = 'http://127.0.0.1:8000/interaction_form.html' |
| 20 self._test_server = httpd.HTTPListener(8000, docroot=self.bindir) | 20 self._test_server = httpd.HTTPListener(8000, docroot=self.bindir) |
| 21 self._test_server.run() | 21 self._test_server.run() |
| 22 | 22 |
| 23 ui_test.UITest.initialize(self, creds) | 23 cros_ui_test.UITest.initialize(self, creds) |
| 24 | 24 |
| 25 | 25 |
| 26 def cleanup(self): | 26 def cleanup(self): |
| 27 self._test_server.stop() | 27 self._test_server.stop() |
| 28 ui_test.UITest.cleanup(self) | 28 cros_ui_test.UITest.cleanup(self) |
| 29 | 29 |
| 30 | 30 |
| 31 def log_error(self, test_name, message): | 31 def log_error(self, test_name, message): |
| 32 self.job.record('ERROR', None, test_name, message) | 32 self.job.record('ERROR', None, test_name, message) |
| 33 self._failed.append(test_name) | 33 self._failed.append(test_name) |
| 34 | 34 |
| 35 | 35 |
| 36 # TODO(zork) We should share this with platform_ProcessPrivleges. | 36 # TODO(zork) We should share this with platform_ProcessPrivleges. |
| 37 # See: crosbug.com/7453 | 37 # See: crosbug.com/7453 |
| 38 def check_process(self, process, user=None): | 38 def check_process(self, process, user=None): |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 self.test_engine('ko', 'hangul', 'wl ', '\xEC\xA7\x80 ') | 360 self.test_engine('ko', 'hangul', 'wl ', '\xEC\xA7\x80 ') |
| 361 self.test_engine('zh-CN', 'pinyin', 'nihao ', | 361 self.test_engine('zh-CN', 'pinyin', 'nihao ', |
| 362 '\xE4\xBD\xA0\xE5\xA5\xBD') | 362 '\xE4\xBD\xA0\xE5\xA5\xBD') |
| 363 self.test_engine('zh-TW', 'm17n:zh:quick', 'aa ', '\xE9\x96\x93') | 363 self.test_engine('zh-TW', 'm17n:zh:quick', 'aa ', '\xE9\x96\x93') |
| 364 | 364 |
| 365 self.test_ibus_stop_process() | 365 self.test_ibus_stop_process() |
| 366 | 366 |
| 367 if len(self._failed) != 0: | 367 if len(self._failed) != 0: |
| 368 raise error.TestFail( | 368 raise error.TestFail( |
| 369 'Failed: %s' % ','.join(self._failed)) | 369 'Failed: %s' % ','.join(self._failed)) |
| OLD | NEW |