Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Unified Diff: client/site_tests/desktopui_IBusTest/desktopui_IBusTest.py

Issue 3451014: Ignore ibus preferences that get set at an indeterminate time (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/site_tests/desktopui_IBusTest/desktopui_IBusTest.py
diff --git a/client/site_tests/desktopui_IBusTest/desktopui_IBusTest.py b/client/site_tests/desktopui_IBusTest/desktopui_IBusTest.py
index c825ded3fd3dcd89dd3bae1bff69bcfde3cda9b6..975594540b770b380adfe33e89142a53b2d8a675 100644
--- a/client/site_tests/desktopui_IBusTest/desktopui_IBusTest.py
+++ b/client/site_tests/desktopui_IBusTest/desktopui_IBusTest.py
@@ -171,14 +171,6 @@ class desktopui_IBusTest(site_ui_test.UITest):
'engine/PinyinLookupTableOrientation',
'engine/PinyinSpecialPhrases',
- # These preferences are actually read, but
- # ibus-daemon reads them before chrome
- # connects, so they show up as a false
- # failure.
- 'general/hotkeynext_engine_in_menu',
- 'general/hotkeyprevious_engine',
- 'generalglobal_engine',
-
# We don't set these prefernces.
'general/hotkeytrigger',
'generalembed_preedit_text',
@@ -187,6 +179,13 @@ class desktopui_IBusTest(site_ui_test.UITest):
'generaluse_global_engine',
'generaluse_system_keyboard_layout'])
+ # These preferences are actually written, but due to a race condition
+ # on startup, they can be read by ibus-daemon before chrome connects,
+ # and so sometimes they show up as a false failure.
+ ignored_unwritten = set(['general/hotkeynext_engine_in_menu',
+ 'general/hotkeyprevious_engine',
+ 'generalglobal_engine'])
+
self.preload_engines(engine_list)
# ibus takes some time to preload the engines, and they can't be
@@ -209,6 +208,9 @@ class desktopui_IBusTest(site_ui_test.UITest):
actual_unread = set(re.split('\n', match.group(1).strip()))
actual_unwritten = set(re.split('\n', match.group(2).strip()))
+ # Filter out any preferences we're ignoring
+ actual_unwritten.difference_update(ignored_unwritten)
+
new_unread = actual_unread.difference(expected_unread)
now_read = expected_unread.difference(actual_unread)
new_unwritten = actual_unwritten.difference(expected_unwritten)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698