| Index: chrome/test/data/webui/settings/fake_input_method_private.js
|
| diff --git a/chrome/test/data/webui/settings/fake_input_method_private.js b/chrome/test/data/webui/settings/fake_input_method_private.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..98ba91e7d39ca6861f67501f0a2b0beaa326f7df
|
| --- /dev/null
|
| +++ b/chrome/test/data/webui/settings/fake_input_method_private.js
|
| @@ -0,0 +1,37 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +/**
|
| + * @fileoverview Fake implementation of chrome.inputMethodPrivate
|
| + * for testing.
|
| + */
|
| +cr.define('settings', function() {
|
| + /**
|
| + * Fake of the chrome.inputMethodsPrivate API. Only methods that are called
|
| + * during testing have been implemented.
|
| + *
|
| + * @constructor
|
| + * @implements {InputMethodPrivate}
|
| + */
|
| + function FakeInputMethodPrivate() {}
|
| +
|
| + FakeInputMethodPrivate.prototype = {
|
| + getCurrentInputMethod: function(callback) {
|
| + callback(null);
|
| + },
|
| +
|
| + get onChanged() {
|
| + return {
|
| + addListener: function() {
|
| + // Nothing to do here.
|
| + },
|
| + removeListener: function() {
|
| + // Nothing to do here.
|
| + },
|
| + };
|
| + },
|
| + };
|
| +
|
| + return {FakeInputMethodPrivate: FakeInputMethodPrivate};
|
| +});
|
|
|