Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #include "chrome/browser/ui/webui/options/multilanguage_options_browsertest.h" | |
| 6 | |
| 7 #include <string> | |
| 8 | |
| 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" | |
| 14 | |
| 15 MultilanguageOptionsBrowserTest::MultilanguageOptionsBrowserTest() { | |
| 16 } | |
| 17 | |
| 18 MultilanguageOptionsBrowserTest::~MultilanguageOptionsBrowserTest() { | |
| 19 } | |
| 20 | |
| 21 void MultilanguageOptionsBrowserTest::SetBlankDictionariesPref() { | |
| 22 browser()->profile()->GetPrefs()->Set(prefs::kSpellCheckDictionaries, | |
| 23 base::ListValue()); | |
|
Dan Beam
2015/07/09 17:56:48
SetDictionaries(base::ListValue());
Julius
2015/07/09 18:49:11
Done.
| |
| 24 } | |
| 25 | |
| 26 void MultilanguageOptionsBrowserTest::SetUpOnMainThread() { | |
| 27 WebUIBrowserTest::SetUpOnMainThread(); | |
| 28 #if defined(OS_CHROMEOS) | |
| 29 std::string setting_name = prefs::kLanguagePreferredLanguages; | |
| 30 #else | |
| 31 std::string setting_name = prefs::kAcceptLanguages; | |
| 32 #endif | |
| 33 | |
| 34 browser()->profile()->GetPrefs()->SetString(setting_name, "fr,es,de,en"); | |
| 35 base::ListValue dictionaries; | |
| 36 dictionaries.AppendString("fr"); | |
| 37 browser()->profile()->GetPrefs()->Set(prefs::kSpellCheckDictionaries, | |
| 38 dictionaries); | |
|
Dan Beam
2015/07/09 17:56:48
SetDictionariesPref(dictionaries);
Julius
2015/07/09 18:49:11
Done.
| |
| 39 browser()->profile()->GetPrefs()->SetString(prefs::kSpellCheckDictionary, | |
| 40 std::string()); | |
| 41 } | |
| 42 | |
| 43 void MultilanguageOptionsBrowserTest::SetUpCommandLine( | |
| 44 base::CommandLine* command_line) { | |
| 45 WebUIBrowserTest::SetUpCommandLine(command_line); | |
| 46 command_line->AppendSwitch(switches::kEnableMultilingualSpellChecker); | |
| 47 } | |
|
Dan Beam
2015/07/09 17:56:48
add a private
void MultilanguageOptionsBrowserTes
Julius
2015/07/09 18:49:11
Done.
| |
| OLD | NEW |