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

Unified Diff: chrome/test/data/webui/settings/fake_language_settings_private.js

Issue 1897913002: Input method functions for chrome.languageSettingsPrivate and chrome.inputMethodPrivate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 4 years, 8 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: chrome/test/data/webui/settings/fake_language_settings_private.js
diff --git a/chrome/test/data/webui/settings/fake_language_settings_private.js b/chrome/test/data/webui/settings/fake_language_settings_private.js
index 26bb2a0e18cc8fdd27f693d85c68c2fb5949dec1..37e0e7515cfe55061e49dcda3734f08009304518 100644
--- a/chrome/test/data/webui/settings/fake_language_settings_private.js
+++ b/chrome/test/data/webui/settings/fake_language_settings_private.js
@@ -73,6 +73,19 @@ cr.define('settings', function() {
supportsSpellcheck: true,
supportsUI: true,
}];
+
+ /** @type {!Array<!chrome.languageSettingsPrivate.InputMethod>} */
+ this.componentExtensionImes = [{
+ id: '_comp_ime_fgoepimhcoialccpbmpnnblemnepkkaoxkb:us::eng',
+ displayName: 'US keyboard',
+ languageCodes: ['en', 'en-US'],
+ enabled: true,
+ }, {
+ id: '_comp_ime_fgoepimhcoialccpbmpnnblemnepkkaoxkb:us:dvorak:eng',
+ displayName: 'US Dvorak keyboard',
+ languageCodes: ['en', 'en-US'],
+ enabled: true,
+ }];
}
FakeLanguageSettingsPrivate.prototype = {
@@ -151,7 +164,15 @@ cr.define('settings', function() {
* @param {function(!chrome.languageSettingsPrivate.InputMethodLists):void}
* callback
*/
- getInputMethodLists: wrapAssertNotReached('getInputMethodLists'),
+ getInputMethodLists: function(callback) {
+ if (!cr.isChromeOS)
+ assertNotReached();
+ callback({
+ componentExtensionImes:
+ JSON.parse(JSON.stringify(this.componentExtensionImes)),
+ thirdPartyExtensionImes: [],
+ });
+ },
/**
* Adds the input method to the current user's list of enabled input
« no previous file with comments | « chrome/common/extensions/api/input_method_private.json ('k') | extensions/browser/extension_function_histogram_value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698