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

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

Issue 3038025: Implement the "Configure modifier keys" drop-down (Closed)
Patch Set: review fix Created 10 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 unified diff | Download patch
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 return true; 94 return true;
95 } 95 }
96 96
97 } // namespace 97 } // namespace
98 98
99 // Checks |default_pref_value| in LanguageMultipleChoicePreference prefs. 99 // Checks |default_pref_value| in LanguageMultipleChoicePreference prefs.
100 TEST(LanguagePreferencesTest, TestDefaultValuesOfMultipleChoicePrefs) { 100 TEST(LanguagePreferencesTest, TestDefaultValuesOfMultipleChoicePrefs) {
101 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs( 101 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs(
102 kChewingMultipleChoicePrefs, kNumChewingMultipleChoicePrefs)); 102 kChewingMultipleChoicePrefs, kNumChewingMultipleChoicePrefs));
103 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs( 103 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs(
104 &kXkbModifierMultipleChoicePrefs, 1));
105 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs(
104 &kChewingHsuSelKeyType, 1)); 106 &kChewingHsuSelKeyType, 1));
105 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs( 107 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs(
106 &kPinyinDoublePinyinSchema, 1)); 108 &kPinyinDoublePinyinSchema, 1));
107 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs( 109 EXPECT_TRUE(CheckDefaultValueOfMultipleChoicePrefs(
108 kMozcMultipleChoicePrefs, kNumMozcMultipleChoicePrefs)); 110 kMozcMultipleChoicePrefs, kNumMozcMultipleChoicePrefs));
109 } 111 }
110 112
111 // Checks |ibus_config_value| and |item_message_id| duplications in 113 // Checks |ibus_config_value| and |item_message_id| duplications in
112 // LanguageMultipleChoicePreference prefs. 114 // LanguageMultipleChoicePreference prefs.
113 TEST(LanguagePreferencesTest, TestDuplicationOfMultipleChoicePrefs) { 115 TEST(LanguagePreferencesTest, TestDuplicationOfMultipleChoicePrefs) {
114 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs( 116 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs(
115 kChewingMultipleChoicePrefs, kNumChewingMultipleChoicePrefs)); 117 kChewingMultipleChoicePrefs, kNumChewingMultipleChoicePrefs));
116 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs( 118 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs(
119 &kXkbModifierMultipleChoicePrefs, 1));
120 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs(
117 &kChewingHsuSelKeyType, 1)); 121 &kChewingHsuSelKeyType, 1));
118 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs( 122 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs(
119 &kPinyinDoublePinyinSchema, 1)); 123 &kPinyinDoublePinyinSchema, 1));
120 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs( 124 EXPECT_TRUE(CheckDuplicationOfMultipleChoicePrefs(
121 kMozcMultipleChoicePrefs, kNumMozcMultipleChoicePrefs)); 125 kMozcMultipleChoicePrefs, kNumMozcMultipleChoicePrefs));
122 } 126 }
123 127
124 // Checks |default_pref_value| in LanguageIntegerRangePreference prefs. 128 // Checks |default_pref_value| in LanguageIntegerRangePreference prefs.
125 TEST(LanguagePreferencesTest, TestDefaultValuesOfIntegerRangePrefs) { 129 TEST(LanguagePreferencesTest, TestDefaultValuesOfIntegerRangePrefs) {
126 EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs( 130 EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs(
127 kChewingIntegerPrefs, kNumChewingIntegerPrefs)); 131 kChewingIntegerPrefs, kNumChewingIntegerPrefs));
128 EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs( 132 EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs(
129 kMozcIntegerPrefs, kNumMozcIntegerPrefs)); 133 kMozcIntegerPrefs, kNumMozcIntegerPrefs));
130 } 134 }
131 135
132 } // namespace chromeos 136 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/language_preferences.h ('k') | chrome/browser/chromeos/options/language_config_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698