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

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

Issue 2690263002: MD Settings: add empty list message for spell-check edit page. (Closed)
Patch Set: use comparison instead of boolean conversion Created 3 years, 10 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 220cbfac13e9b4469ecbb8d74e3526b0cc3cc5c0..89abf807d98f747c653cffe0d5b94373e28901b7 100644
--- a/chrome/test/data/webui/settings/fake_language_settings_private.js
+++ b/chrome/test/data/webui/settings/fake_language_settings_private.js
@@ -22,9 +22,15 @@ cr.define('settings', function() {
/**
* Fake of the chrome.languageSettingsPrivate API.
* @constructor
+ * @extends {TestBrowserProxy}
* @implements {LanguageSettingsPrivate}
*/
function FakeLanguageSettingsPrivate() {
+ // List of method names expected to be tested with whenCalled()
+ settings.TestBrowserProxy.call(this, [
+ 'getSpellcheckWords',
+ ]);
+
/** @type {!Array<!chrome.languageSettingsPrivate.Language>} */
this.languages = [{
// English and some variants.
@@ -99,6 +105,7 @@ cr.define('settings', function() {
}
FakeLanguageSettingsPrivate.prototype = {
+ __proto__: settings.TestBrowserProxy.prototype,
// Methods for use in testing.
/** @param {SettingsPrefsElement} */
@@ -172,13 +179,18 @@ cr.define('settings', function() {
* Gets the custom spell check words, in sorted order.
* @param {function(!Array<string>):void} callback
*/
- getSpellcheckWords: wrapAssertNotReached('getSpellcheckWords'),
+ getSpellcheckWords: function(callback) {
+ callback([]);
+ this.methodCalled('getSpellcheckWords');
+ },
/**
* Adds a word to the custom dictionary.
* @param {string} word
*/
- addSpellcheckWord: wrapAssertNotReached('addSpellcheckWord'),
+ addSpellcheckWord: function(word) {
+ // Current tests don't actually care about this implementation.
+ },
/**
* Removes a word from the custom dictionary.

Powered by Google App Engine
This is Rietveld 408576698