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

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

Issue 2827553002: MD Settings: Use a browser proxy from the languages page. Re-enable test. (Closed)
Patch Set: Remove accidental usage of getInputMethodPrivate() on non-Cros Created 3 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_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};
+});
« no previous file with comments | « chrome/test/data/webui/settings/cr_settings_browsertest.js ('k') | chrome/test/data/webui/settings/languages_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698