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_webui_browsertes t.h" | |
| 6 | |
| 7 #include <string> | |
| 8 | |
| 9 #include "base/command_line.h" | |
| 10 #include "base/prefs/pref_service.h" | |
|
please use gerrit instead
2015/06/17 17:47:16
is this include necessary?
Julius
2015/06/17 20:14:46
pref_service is, browser_prefs is not. Removed.
| |
| 11 #include "chrome/browser/prefs/browser_prefs.h" | |
| 12 #include "chrome/browser/ui/browser_window.h" | |
|
please use gerrit instead
2015/06/17 17:47:16
Is this include necessary?
Julius
2015/06/17 20:14:46
Yes. I believe it's used to get a profile ( browse
| |
| 13 #include "chrome/common/chrome_switches.h" | |
| 14 #include "chrome/common/pref_names.h" | |
| 15 | |
| 16 MultilanguageOptionsWebUIBrowserTest::MultilanguageOptionsWebUIBrowserTest() { | |
| 17 } | |
| 18 | |
| 19 MultilanguageOptionsWebUIBrowserTest::~MultilanguageOptionsWebUIBrowserTest() { | |
| 20 } | |
| 21 | |
| 22 void MultilanguageOptionsWebUIBrowserTest::SetUpOnMainThread() { | |
| 23 WebUIBrowserTest::SetUpOnMainThread(); | |
| 24 #if defined(OS_CHROMEOS) | |
| 25 std::string setting_name = prefs::kLanguagePreferredLanguages; | |
| 26 #else | |
| 27 std::string setting_name = prefs::kAcceptLanguages; | |
| 28 #endif | |
| 29 | |
| 30 browser()->profile()->GetPrefs()->SetString(setting_name, "fr,es,de"); | |
| 31 browser()->profile()->GetPrefs()->SetString(prefs::kSpellCheckDictionaries, | |
| 32 "fr"); | |
| 33 } | |
| 34 | |
| 35 void MultilanguageOptionsWebUIBrowserTest::SetUpCommandLine( | |
| 36 base::CommandLine* command_line) { | |
| 37 WebUIBrowserTest::SetUpCommandLine(command_line); | |
| 38 command_line->AppendSwitch(switches::kEnableMultilingualSpellChecker); | |
| 39 } | |
| OLD | NEW |