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

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

Issue 6685093: Use keyboard_layout instead of initial_locale (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: Created 9 years, 9 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
Index: client/site_tests/factory_SelectKeyboard/factory_SelectKeyboard.py
diff --git a/client/site_tests/factory_SelectKeyboard/factory_SelectKeyboard.py b/client/site_tests/factory_SelectKeyboard/factory_SelectKeyboard.py
index c52c788d547f000b97924d0a2fb138af3c42b813..fb0cc1b246f59786f00c80c654a9efef08d4458c 100644
--- a/client/site_tests/factory_SelectKeyboard/factory_SelectKeyboard.py
+++ b/client/site_tests/factory_SelectKeyboard/factory_SelectKeyboard.py
@@ -22,20 +22,23 @@ from autotest_lib.client.common_lib import error
# Mapping between menu choice and KB.
kb_map = {
- '1': 'en-US',
- '2': 'en-GB',
- 'q': None,
+ '1': ('United States', 'en-US', 'xkb:us::eng'),
+ '2': ('United Kingdom', 'en-GB', 'xkb:gb:extd:eng'),
+ 'q': ('None', None, None)
}
# Message to display.
msg = ('Choose a keyboard:\n' +
- "".join([ '%s) %s\n' % (i, kb_map[i]) for i in sorted(kb_map)]))
+ "".join([ '%s) %s - %s\n' % (i, kb_map[i][0], kb_map[i][1])
+ for i in sorted(kb_map)]))
class factory_SelectKeyboard(test.test):
version = 1
def write_kb(self, kb):
- cmd = 'vpd -s "initial_locale"="%s"' % kb
+ cmd = 'vpd -i RO_VPD -s "initial_locale"="%s"' % kb[1]
+ utils.system_output(cmd)
+ cmd = 'vpd -i RO_VPD -s "keyboard_layout"="%s"' % kb[2]
utils.system_output(cmd)
def key_release_callback(self, widget, event):
« no previous file with comments | « client/site_tests/factory_Keyboard/src/en-GB.png ('k') | client/site_tests/hardware_Components/hardware_Components.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698