| OLD | NEW |
| 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" |
| 11 | 11 |
| 12 namespace chromeos { | 12 namespace chromeos { |
| 13 namespace language_prefs { |
| 13 | 14 |
| 14 namespace { | 15 namespace { |
| 15 | 16 |
| 16 // Compares |a| and |b| and returns true if a is equal to b. The second one is a | 17 // Compares |a| and |b| and returns true if a is equal to b. The second one is a |
| 17 // specialized function for LanguageMultipleChoicePreference<const char*>. | 18 // specialized function for LanguageMultipleChoicePreference<const char*>. |
| 18 template <typename T> | 19 template <typename T> |
| 19 bool Compare(T a, T b) { | 20 bool Compare(T a, T b) { |
| 20 return a == b; | 21 return a == b; |
| 21 } | 22 } |
| 22 template <> | 23 template <> |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs( | 131 EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs( |
| 131 kChewingIntegerPrefs, kNumChewingIntegerPrefs)); | 132 kChewingIntegerPrefs, kNumChewingIntegerPrefs)); |
| 132 EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs( | 133 EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs( |
| 133 kMozcIntegerPrefs, kNumMozcIntegerPrefs)); | 134 kMozcIntegerPrefs, kNumMozcIntegerPrefs)); |
| 134 EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs( | 135 EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs( |
| 135 &kXkbAutoRepeatDelayPref, 1)); | 136 &kXkbAutoRepeatDelayPref, 1)); |
| 136 EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs( | 137 EXPECT_TRUE(CheckDefaultValueOfIntegerRangePrefs( |
| 137 &kXkbAutoRepeatIntervalPref, 1)); | 138 &kXkbAutoRepeatIntervalPref, 1)); |
| 138 } | 139 } |
| 139 | 140 |
| 141 } // namespace language_prefs |
| 140 } // namespace chromeos | 142 } // namespace chromeos |
| OLD | NEW |