| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/webui/options/multilanguage_options_browsertest.h" | 5 #include "chrome/browser/ui/webui/options/multilanguage_options_browsertest.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/prefs/pref_service.h" | |
| 11 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 12 #include "chrome/browser/ui/browser_window.h" | 11 #include "chrome/browser/ui/browser_window.h" |
| 13 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
| 14 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
| 14 #include "components/prefs/pref_service.h" |
| 15 | 15 |
| 16 MultilanguageOptionsBrowserTest::MultilanguageOptionsBrowserTest() { | 16 MultilanguageOptionsBrowserTest::MultilanguageOptionsBrowserTest() { |
| 17 } | 17 } |
| 18 | 18 |
| 19 MultilanguageOptionsBrowserTest::~MultilanguageOptionsBrowserTest() { | 19 MultilanguageOptionsBrowserTest::~MultilanguageOptionsBrowserTest() { |
| 20 } | 20 } |
| 21 | 21 |
| 22 void MultilanguageOptionsBrowserTest::ClearSpellcheckDictionaries() { | 22 void MultilanguageOptionsBrowserTest::ClearSpellcheckDictionaries() { |
| 23 SetDictionariesPref(base::ListValue()); | 23 SetDictionariesPref(base::ListValue()); |
| 24 } | 24 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 36 dictionaries.AppendString("fr"); | 36 dictionaries.AppendString("fr"); |
| 37 SetDictionariesPref(dictionaries); | 37 SetDictionariesPref(dictionaries); |
| 38 browser()->profile()->GetPrefs()->SetString(prefs::kSpellCheckDictionary, | 38 browser()->profile()->GetPrefs()->SetString(prefs::kSpellCheckDictionary, |
| 39 std::string()); | 39 std::string()); |
| 40 } | 40 } |
| 41 | 41 |
| 42 void MultilanguageOptionsBrowserTest::SetDictionariesPref( | 42 void MultilanguageOptionsBrowserTest::SetDictionariesPref( |
| 43 const base::ListValue& value) { | 43 const base::ListValue& value) { |
| 44 browser()->profile()->GetPrefs()->Set(prefs::kSpellCheckDictionaries, value); | 44 browser()->profile()->GetPrefs()->Set(prefs::kSpellCheckDictionaries, value); |
| 45 } | 45 } |
| OLD | NEW |