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

Side by Side Diff: chrome/browser/chromeos/language_preferences_unittest.cc

Issue 7016036: Sync IME preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/language_preferences.cc ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/language_preferences.h" 5 #include "chrome/browser/chromeos/language_preferences.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 #include <set> 8 #include <set>
9 9
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 return true; 95 return true;
96 } 96 }
97 97
98 } // namespace 98 } // namespace
99 99
100 // Checks |default_pref_value| in LanguageMultipleChoicePreference prefs. 100 // Checks |default_pref_value| in LanguageMultipleChoicePreference prefs.
101 TEST(LanguagePreferencesTest, TestDefaultValuesOfMultipleChoicePrefs) { 101 TEST(LanguagePreferencesTest, TestDefaultValuesOfMultipleChoicePrefs) {
102 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs( 102 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs(
103 kChewingMultipleChoicePrefs, kNumChewingMultipleChoicePrefs)); 103 kChewingMultipleChoicePrefs, kNumChewingMultipleChoicePrefs));
104 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs( 104 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs(
105 &kXkbModifierMultipleChoicePrefs, 1));
106 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs(
107 &kChewingHsuSelKeyType, 1)); 105 &kChewingHsuSelKeyType, 1));
108 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs( 106 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs(
109 &kPinyinDoublePinyinSchema, 1)); 107 &kPinyinDoublePinyinSchema, 1));
110 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs( 108 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs(
111 kMozcMultipleChoicePrefs, kNumMozcMultipleChoicePrefs)); 109 kMozcMultipleChoicePrefs, kNumMozcMultipleChoicePrefs));
112 } 110 }
113 111
114 // Checks |ibus_config_value| and |item_message_id| duplications in 112 // Checks |ibus_config_value| and |item_message_id| duplications in
115 // LanguageMultipleChoicePreference prefs. 113 // LanguageMultipleChoicePreference prefs.
116 TEST(LanguagePreferencesTest, TestDuplicationOfMultipleChoicePrefs) { 114 TEST(LanguagePreferencesTest, TestDuplicationOfMultipleChoicePrefs) {
117 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs( 115 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs(
118 kChewingMultipleChoicePrefs, kNumChewingMultipleChoicePrefs)); 116 kChewingMultipleChoicePrefs, kNumChewingMultipleChoicePrefs));
119 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs( 117 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs(
120 &kXkbModifierMultipleChoicePrefs, 1));
121 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs(
122 &kChewingHsuSelKeyType, 1)); 118 &kChewingHsuSelKeyType, 1));
123 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs( 119 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs(
124 &kPinyinDoublePinyinSchema, 1)); 120 &kPinyinDoublePinyinSchema, 1));
125 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs( 121 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs(
126 kMozcMultipleChoicePrefs, kNumMozcMultipleChoicePrefs)); 122 kMozcMultipleChoicePrefs, kNumMozcMultipleChoicePrefs));
127 } 123 }
128 124
129 // Checks |default_pref_value| in LanguageIntegerRangePreference prefs. 125 // Checks |default_pref_value| in LanguageIntegerRangePreference prefs.
130 TEST(LanguagePreferencesTest, TestDefaultValuesOfIntegerRangePrefs) { 126 TEST(LanguagePreferencesTest, TestDefaultValuesOfIntegerRangePrefs) {
131 EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs( 127 EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs(
132 kChewingIntegerPrefs, kNumChewingIntegerPrefs)); 128 kChewingIntegerPrefs, kNumChewingIntegerPrefs));
133 EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs( 129 EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs(
134 kMozcIntegerPrefs, kNumMozcIntegerPrefs)); 130 kMozcIntegerPrefs, kNumMozcIntegerPrefs));
135 } 131 }
136 132
137 } // namespace language_prefs 133 } // namespace language_prefs
138 } // namespace chromeos 134 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/language_preferences.cc ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698