Index: chrome/browser/ui/webui/options/multilanguage_options_browsertest.cc |
diff --git a/chrome/browser/ui/webui/options/multilanguage_options_browsertest.cc b/chrome/browser/ui/webui/options/multilanguage_options_browsertest.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..08c68a66d62fc1d77573c9c344dc531f8f1adacc |
--- /dev/null |
+++ b/chrome/browser/ui/webui/options/multilanguage_options_browsertest.cc |
@@ -0,0 +1,47 @@ |
+// 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_browsertest.h" |
+ |
+#include <string> |
+ |
+#include "base/command_line.h" |
+#include "base/prefs/pref_service.h" |
+#include "chrome/browser/ui/browser_window.h" |
+#include "chrome/common/chrome_switches.h" |
+#include "chrome/common/pref_names.h" |
+ |
+MultilanguageOptionsBrowserTest::MultilanguageOptionsBrowserTest() { |
+} |
+ |
+MultilanguageOptionsBrowserTest::~MultilanguageOptionsBrowserTest() { |
+} |
+ |
+void MultilanguageOptionsBrowserTest::SetBlankDictionariesPref() { |
+ browser()->profile()->GetPrefs()->Set(prefs::kSpellCheckDictionaries, |
+ base::ListValue()); |
Dan Beam
2015/07/09 17:56:48
SetDictionaries(base::ListValue());
Julius
2015/07/09 18:49:11
Done.
|
+} |
+ |
+void MultilanguageOptionsBrowserTest::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,en"); |
+ base::ListValue dictionaries; |
+ dictionaries.AppendString("fr"); |
+ browser()->profile()->GetPrefs()->Set(prefs::kSpellCheckDictionaries, |
+ dictionaries); |
Dan Beam
2015/07/09 17:56:48
SetDictionariesPref(dictionaries);
Julius
2015/07/09 18:49:11
Done.
|
+ browser()->profile()->GetPrefs()->SetString(prefs::kSpellCheckDictionary, |
+ std::string()); |
+} |
+ |
+void MultilanguageOptionsBrowserTest::SetUpCommandLine( |
+ base::CommandLine* command_line) { |
+ WebUIBrowserTest::SetUpCommandLine(command_line); |
+ command_line->AppendSwitch(switches::kEnableMultilingualSpellChecker); |
+} |
Dan Beam
2015/07/09 17:56:48
add a private
void MultilanguageOptionsBrowserTes
Julius
2015/07/09 18:49:11
Done.
|