| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/preferences.h" | 5 #include "chrome/browser/chromeos/preferences.h" |
| 6 | 6 |
| 7 #include "chrome/browser/api/prefs/pref_member.h" |
| 7 #include "chrome/browser/chromeos/input_method/mock_input_method_manager.h" | 8 #include "chrome/browser/chromeos/input_method/mock_input_method_manager.h" |
| 8 #include "chrome/browser/prefs/pref_member.h" | |
| 9 #include "chrome/common/pref_names.h" | 9 #include "chrome/common/pref_names.h" |
| 10 #include "chrome/test/base/testing_pref_service.h" | 10 #include "chrome/test/base/testing_pref_service.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 namespace chromeos { | 13 namespace chromeos { |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 class MyMockInputMethodManager : public input_method::MockInputMethodManager { | 16 class MyMockInputMethodManager : public input_method::MockInputMethodManager { |
| 17 public: | 17 public: |
| 18 MyMockInputMethodManager(StringPrefMember* previous, | 18 MyMockInputMethodManager(StringPrefMember* previous, |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 testee.InitUserPrefsForTesting(&prefs); | 68 testee.InitUserPrefsForTesting(&prefs); |
| 69 testee.SetInputMethodListForTesting(); | 69 testee.SetInputMethodListForTesting(); |
| 70 | 70 |
| 71 // Confirm they're unchanged. | 71 // Confirm they're unchanged. |
| 72 EXPECT_EQ("KeyboardA", previous.GetValue()); | 72 EXPECT_EQ("KeyboardA", previous.GetValue()); |
| 73 EXPECT_EQ("KeyboardB", current.GetValue()); | 73 EXPECT_EQ("KeyboardB", current.GetValue()); |
| 74 EXPECT_EQ("KeyboardB", mock_manager.last_input_method_id_); | 74 EXPECT_EQ("KeyboardB", mock_manager.last_input_method_id_); |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace chromeos | 77 } // namespace chromeos |
| OLD | NEW |