Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / webui / chromeos / login / l10n_util_test_util.cc
blobbbc5ae10bde07984b5764ed89accd9795ba0cad5
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/webui/chromeos/login/l10n_util_test_util.h"
7 #include <vector>
9 #include "url/gurl.h"
11 namespace chromeos {
13 MockInputMethodManagerWithInputMethods::
14 MockInputMethodManagerWithInputMethods() {
17 MockInputMethodManagerWithInputMethods::
18 ~MockInputMethodManagerWithInputMethods() {
21 scoped_ptr<input_method::InputMethodDescriptors>
22 MockInputMethodManagerWithInputMethods::GetSupportedInputMethods() const {
23 return scoped_ptr<input_method::InputMethodDescriptors>(
24 new input_method::InputMethodDescriptors(descriptors_));
27 void MockInputMethodManagerWithInputMethods::AddInputMethod(
28 const std::string& id,
29 const std::string& raw_layout,
30 const std::string& language_code) {
31 std::vector<std::string> layouts;
32 layouts.push_back(raw_layout);
33 std::vector<std::string> languages;
34 languages.push_back(language_code);
35 descriptors_.push_back(input_method::InputMethodDescriptor(
36 id, std::string(), std::string(), layouts, languages, true,
37 GURL(), GURL()));
40 } // namespace chromeos