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

Side by Side Diff: chrome/browser/ui/webui/options/language_options_handler_unittest.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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) 2012 The Chromium Authors. All rights reserved. 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 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/ui/webui/options/language_options_handler.h" 5 #include "chrome/browser/ui/webui/options/language_options_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 #if !defined(OS_MACOSX) 13 #if !defined(OS_MACOSX)
14 TEST(LanguageOptionsHandlerTest, GetUILanguageCodeSet) { 14 TEST(LanguageOptionsHandlerTest, GetUILanguageCodeSet) {
15 scoped_ptr<base::DictionaryValue> dictionary( 15 std::unique_ptr<base::DictionaryValue> dictionary(
16 options::LanguageOptionsHandler::GetUILanguageCodeSet()); 16 options::LanguageOptionsHandler::GetUILanguageCodeSet());
17 EXPECT_TRUE(dictionary->HasKey("en-US")); 17 EXPECT_TRUE(dictionary->HasKey("en-US"));
18 // Note that we don't test a false case, as such an expectation will 18 // Note that we don't test a false case, as such an expectation will
19 // fail when we add support for the language. 19 // fail when we add support for the language.
20 // EXPECT_FALSE(dictionary->HasKey("no")); 20 // EXPECT_FALSE(dictionary->HasKey("no"));
21 } 21 }
22 #endif // !defined(OS_MACOSX) 22 #endif // !defined(OS_MACOSX)
23 23
24 TEST(LanguageOptionsHandlerTest, GetSpellCheckLanguageCodeSet) { 24 TEST(LanguageOptionsHandlerTest, GetSpellCheckLanguageCodeSet) {
25 scoped_ptr<base::DictionaryValue> dictionary( 25 std::unique_ptr<base::DictionaryValue> dictionary(
26 options::LanguageOptionsHandler::GetSpellCheckLanguageCodeSet()); 26 options::LanguageOptionsHandler::GetSpellCheckLanguageCodeSet());
27 EXPECT_TRUE(dictionary->HasKey("en-US")); 27 EXPECT_TRUE(dictionary->HasKey("en-US"));
28 } 28 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/language_options_handler_common.cc ('k') | chrome/browser/ui/webui/options/options_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698