Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / ui / webui / options / multilanguage_options_browsertest.cc
blobda869f57236c57a6653c30d44a8a5fc4d9c18c6f
1 // Copyright 2015 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 #include "chrome/browser/ui/webui/options/multilanguage_options_browsertest.h"
7 #include <string>
9 #include "base/command_line.h"
10 #include "base/prefs/pref_service.h"
11 #include "chrome/browser/ui/browser_window.h"
12 #include "chrome/common/chrome_switches.h"
13 #include "chrome/common/pref_names.h"
15 MultilanguageOptionsBrowserTest::MultilanguageOptionsBrowserTest() {
18 MultilanguageOptionsBrowserTest::~MultilanguageOptionsBrowserTest() {
21 void MultilanguageOptionsBrowserTest::ClearSpellcheckDictionaries() {
22 SetDictionariesPref(base::ListValue());
25 void MultilanguageOptionsBrowserTest::SetUpOnMainThread() {
26 WebUIBrowserTest::SetUpOnMainThread();
27 #if defined(OS_CHROMEOS)
28 std::string setting_name = prefs::kLanguagePreferredLanguages;
29 #else
30 std::string setting_name = prefs::kAcceptLanguages;
31 #endif
33 browser()->profile()->GetPrefs()->SetString(setting_name, "fr,es,de,en");
34 base::ListValue dictionaries;
35 dictionaries.AppendString("fr");
36 SetDictionariesPref(dictionaries);
37 browser()->profile()->GetPrefs()->SetString(prefs::kSpellCheckDictionary,
38 std::string());
41 void MultilanguageOptionsBrowserTest::SetUpCommandLine(
42 base::CommandLine* command_line) {
43 WebUIBrowserTest::SetUpCommandLine(command_line);
44 command_line->AppendSwitch(switches::kEnableMultilingualSpellChecker);
47 void MultilanguageOptionsBrowserTest::SetDictionariesPref(
48 const base::ListValue& value) {
49 browser()->profile()->GetPrefs()->Set(prefs::kSpellCheckDictionaries, value);