OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium 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 /** | 5 /** |
6 * @fileoverview Fake implementation of chrome.languageSettingsPrivate | 6 * @fileoverview Fake implementation of chrome.languageSettingsPrivate |
7 * for testing. | 7 * for testing. |
8 */ | 8 */ |
9 cr.define('settings', function() { | 9 cr.define('settings', function() { |
10 /** | 10 /** |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 * !chrome.languageSettingsPrivate.SpellcheckDictionaryStatus>):void} | 165 * !chrome.languageSettingsPrivate.SpellcheckDictionaryStatus>):void} |
166 * callback | 166 * callback |
167 */ | 167 */ |
168 getSpellcheckDictionaryStatuses: | 168 getSpellcheckDictionaryStatuses: |
169 wrapAssertNotReached('getSpellcheckDictionaryStatuses'), | 169 wrapAssertNotReached('getSpellcheckDictionaryStatuses'), |
170 | 170 |
171 /** | 171 /** |
172 * Gets the custom spell check words, in sorted order. | 172 * Gets the custom spell check words, in sorted order. |
173 * @param {function(!Array<string>):void} callback | 173 * @param {function(!Array<string>):void} callback |
174 */ | 174 */ |
175 getSpellcheckWords: wrapAssertNotReached('getSpellcheckWords'), | 175 getSpellcheckWords: function(callback) { |
| 176 callback([]); |
| 177 }, |
176 | 178 |
177 /** | 179 /** |
178 * Adds a word to the custom dictionary. | 180 * Adds a word to the custom dictionary. |
179 * @param {string} word | 181 * @param {string} word |
180 */ | 182 */ |
181 addSpellcheckWord: wrapAssertNotReached('addSpellcheckWord'), | 183 addSpellcheckWord: function(word) { |
| 184 // Current tests don't actually care about this implementation. |
| 185 }, |
182 | 186 |
183 /** | 187 /** |
184 * Removes a word from the custom dictionary. | 188 * Removes a word from the custom dictionary. |
185 * @param {string} word | 189 * @param {string} word |
186 */ | 190 */ |
187 removeSpellcheckWord: wrapAssertNotReached('removeSpellcheckWord'), | 191 removeSpellcheckWord: wrapAssertNotReached('removeSpellcheckWord'), |
188 | 192 |
189 /** | 193 /** |
190 * Gets the translate target language (in most cases, the display locale). | 194 * Gets the translate target language (in most cases, the display locale). |
191 * @param {function(string):void} callback | 195 * @param {function(string):void} callback |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 272 |
269 /** | 273 /** |
270 * Called when an input method is removed. | 274 * Called when an input method is removed. |
271 * @type {!ChromeEvent} | 275 * @type {!ChromeEvent} |
272 */ | 276 */ |
273 onInputMethodRemoved: new FakeChromeEvent(), | 277 onInputMethodRemoved: new FakeChromeEvent(), |
274 }; | 278 }; |
275 | 279 |
276 return {FakeLanguageSettingsPrivate: FakeLanguageSettingsPrivate}; | 280 return {FakeLanguageSettingsPrivate: FakeLanguageSettingsPrivate}; |
277 }); | 281 }); |
OLD | NEW |