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

Unified Diff: chrome/browser/ui/webui/chromeos/login/l10n_util_test_util.cc

Issue 397723002: Extract l10n-related parts of NetworkScreenHandler to a helper file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Derive list of input methods from actual locale, not requested locale. This is how it used to work … Created 6 years, 5 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/browser/ui/webui/chromeos/login/l10n_util_test_util.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/l10n_util_test_util.cc b/chrome/browser/ui/webui/chromeos/login/l10n_util_test_util.cc
new file mode 100644
index 0000000000000000000000000000000000000000..bbc5ae10bde07984b5764ed89accd9795ba0cad5
--- /dev/null
+++ b/chrome/browser/ui/webui/chromeos/login/l10n_util_test_util.cc
@@ -0,0 +1,40 @@
+// Copyright 2014 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.
+
+#include "chrome/browser/ui/webui/chromeos/login/l10n_util_test_util.h"
+
+#include <vector>
+
+#include "url/gurl.h"
+
+namespace chromeos {
+
+MockInputMethodManagerWithInputMethods::
+ MockInputMethodManagerWithInputMethods() {
+}
+
+MockInputMethodManagerWithInputMethods::
+ ~MockInputMethodManagerWithInputMethods() {
+}
+
+scoped_ptr<input_method::InputMethodDescriptors>
+MockInputMethodManagerWithInputMethods::GetSupportedInputMethods() const {
+ return scoped_ptr<input_method::InputMethodDescriptors>(
+ new input_method::InputMethodDescriptors(descriptors_));
+}
+
+void MockInputMethodManagerWithInputMethods::AddInputMethod(
+ const std::string& id,
+ const std::string& raw_layout,
+ const std::string& language_code) {
+ std::vector<std::string> layouts;
+ layouts.push_back(raw_layout);
+ std::vector<std::string> languages;
+ languages.push_back(language_code);
+ descriptors_.push_back(input_method::InputMethodDescriptor(
+ id, std::string(), std::string(), layouts, languages, true,
+ GURL(), GURL()));
+}
+
+} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698