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
3// found in the LICENSE file.
4
5#include "chrome/browser/ui/webui/options/language_options_handler.h"
6
7#include <string>
8
9#include "base/values.h"
10#include "testing/gtest/include/gtest/gtest.h"
11
12#if !defined(OS_MACOSX)
13TEST(LanguageOptionsHandlerTest, GetUILanguageCodeSet) {
14  scoped_ptr<base::DictionaryValue> dictionary(
15      options::LanguageOptionsHandler::GetUILanguageCodeSet());
16  EXPECT_TRUE(dictionary->HasKey("en-US"));
17  // Note that we don't test a false case, as such an expectation will
18  // fail when we add support for the language.
19  // EXPECT_FALSE(dictionary->HasKey("no"));
20}
21#endif  // !defined(OS_MACOSX)
22
23TEST(LanguageOptionsHandlerTest, GetSpellCheckLanguageCodeSet) {
24  scoped_ptr<base::DictionaryValue> dictionary(
25      options::LanguageOptionsHandler::GetSpellCheckLanguageCodeSet());
26  EXPECT_TRUE(dictionary->HasKey("en-US"));
27}
28