Chromium Code Reviews| Index: chrome/browser/ui/webui/options/multilanguage_options_webui_browsertest.cc |
| diff --git a/chrome/browser/ui/webui/options/multilanguage_options_webui_browsertest.cc b/chrome/browser/ui/webui/options/multilanguage_options_webui_browsertest.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b202ea97689d3775e343e8cb74b4f890d841ec1c |
| --- /dev/null |
| +++ b/chrome/browser/ui/webui/options/multilanguage_options_webui_browsertest.cc |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/ui/webui/options/multilanguage_options_webui_browsertest.h" |
| + |
| +#include <string> |
| + |
| +#include "base/command_line.h" |
| +#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.
|
| +#include "chrome/browser/prefs/browser_prefs.h" |
| +#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
|
| +#include "chrome/common/chrome_switches.h" |
| +#include "chrome/common/pref_names.h" |
| + |
| +MultilanguageOptionsWebUIBrowserTest::MultilanguageOptionsWebUIBrowserTest() { |
| +} |
| + |
| +MultilanguageOptionsWebUIBrowserTest::~MultilanguageOptionsWebUIBrowserTest() { |
| +} |
| + |
| +void MultilanguageOptionsWebUIBrowserTest::SetUpOnMainThread() { |
| + WebUIBrowserTest::SetUpOnMainThread(); |
| +#if defined(OS_CHROMEOS) |
| + std::string setting_name = prefs::kLanguagePreferredLanguages; |
| +#else |
| + std::string setting_name = prefs::kAcceptLanguages; |
| +#endif |
| + |
| + browser()->profile()->GetPrefs()->SetString(setting_name, "fr,es,de"); |
| + browser()->profile()->GetPrefs()->SetString(prefs::kSpellCheckDictionaries, |
| + "fr"); |
| +} |
| + |
| +void MultilanguageOptionsWebUIBrowserTest::SetUpCommandLine( |
| + base::CommandLine* command_line) { |
| + WebUIBrowserTest::SetUpCommandLine(command_line); |
| + command_line->AppendSwitch(switches::kEnableMultilingualSpellChecker); |
| +} |