Adding WebView support to telemetry scripts.
[chromium-blink-merge.git] / base / win / i18n_unittest.cc
blob781fc39db3439825056e7799d34673986a6d2410
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
3 // found in the LICENSE file.
5 // This file contains unit tests for Windows internationalization funcs.
7 #include "testing/gtest/include/gtest/gtest.h"
9 #include "base/win/i18n.h"
10 #include "base/win/windows_version.h"
12 namespace base {
13 namespace win {
14 namespace i18n {
16 // Tests that at least one user preferred UI language can be obtained.
17 TEST(I18NTest, GetUserPreferredUILanguageList) {
18 std::vector<std::wstring> languages;
19 EXPECT_TRUE(GetUserPreferredUILanguageList(&languages));
20 EXPECT_NE(static_cast<std::vector<std::wstring>::size_type>(0),
21 languages.size());
22 for (std::vector<std::wstring>::const_iterator scan = languages.begin(),
23 end = languages.end(); scan != end; ++scan) {
24 EXPECT_FALSE((*scan).empty());
28 // Tests that at least one thread preferred UI language can be obtained.
29 TEST(I18NTest, GetThreadPreferredUILanguageList) {
30 std::vector<std::wstring> languages;
31 EXPECT_TRUE(GetThreadPreferredUILanguageList(&languages));
32 EXPECT_NE(static_cast<std::vector<std::wstring>::size_type>(0),
33 languages.size());
34 for (std::vector<std::wstring>::const_iterator scan = languages.begin(),
35 end = languages.end(); scan != end; ++scan) {
36 EXPECT_FALSE((*scan).empty());
40 } // namespace i18n
41 } // namespace win
42 } // namespace base