| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/metrics/histogram_samples.h" | 8 #include "base/metrics/histogram_samples.h" |
| 9 #include "base/metrics/statistics_recorder.h" | 9 #include "base/metrics/statistics_recorder.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| 11 #include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h" | 11 #include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h" |
| 12 #include "chrome/browser/spellchecker/spellcheck_factory.h" | 12 #include "chrome/browser/spellchecker/spellcheck_factory.h" |
| 13 #include "chrome/browser/spellchecker/spellcheck_host_metrics.h" | 13 #include "chrome/browser/spellchecker/spellcheck_host_metrics.h" |
| 14 #include "chrome/browser/spellchecker/spellcheck_service.h" | 14 #include "chrome/browser/spellchecker/spellcheck_service.h" |
| 15 #include "chrome/common/chrome_constants.h" | 15 #include "chrome/common/chrome_constants.h" |
| 16 #include "chrome/common/spellcheck_common.h" | 16 #include "chrome/common/spellcheck_common.h" |
| 17 #include "chrome/test/base/testing_profile.h" | 17 #include "chrome/test/base/testing_profile.h" |
| (...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1167 SpellcheckServiceFactory::GetForContext(&profile_); | 1167 SpellcheckServiceFactory::GetForContext(&profile_); |
| 1168 SpellcheckCustomDictionary* custom_dictionary = | 1168 SpellcheckCustomDictionary* custom_dictionary = |
| 1169 spellcheck_service->GetCustomDictionary(); | 1169 spellcheck_service->GetCustomDictionary(); |
| 1170 OnLoaded(*custom_dictionary, WordList()); | 1170 OnLoaded(*custom_dictionary, WordList()); |
| 1171 EXPECT_FALSE(custom_dictionary->HasWord("foo")); | 1171 EXPECT_FALSE(custom_dictionary->HasWord("foo")); |
| 1172 EXPECT_FALSE(custom_dictionary->HasWord("bar")); | 1172 EXPECT_FALSE(custom_dictionary->HasWord("bar")); |
| 1173 custom_dictionary->AddWord("foo"); | 1173 custom_dictionary->AddWord("foo"); |
| 1174 EXPECT_TRUE(custom_dictionary->HasWord("foo")); | 1174 EXPECT_TRUE(custom_dictionary->HasWord("foo")); |
| 1175 EXPECT_FALSE(custom_dictionary->HasWord("bar")); | 1175 EXPECT_FALSE(custom_dictionary->HasWord("bar")); |
| 1176 } | 1176 } |
| OLD | NEW |