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/file_util.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/metrics/histogram_samples.h" | 10 #include "base/metrics/histogram_samples.h" |
11 #include "base/metrics/statistics_recorder.h" | 11 #include "base/metrics/statistics_recorder.h" |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h" | 13 #include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h" |
14 #include "chrome/browser/spellchecker/spellcheck_factory.h" | 14 #include "chrome/browser/spellchecker/spellcheck_factory.h" |
15 #include "chrome/browser/spellchecker/spellcheck_host_metrics.h" | 15 #include "chrome/browser/spellchecker/spellcheck_host_metrics.h" |
16 #include "chrome/browser/spellchecker/spellcheck_service.h" | 16 #include "chrome/browser/spellchecker/spellcheck_service.h" |
17 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
18 #include "chrome/common/spellcheck_common.h" | 18 #include "chrome/common/spellcheck_common.h" |
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1128 SpellcheckServiceFactory::GetForProfile(profile_.get()); | 1128 SpellcheckServiceFactory::GetForProfile(profile_.get()); |
1129 SpellcheckCustomDictionary* custom_dictionary = | 1129 SpellcheckCustomDictionary* custom_dictionary = |
1130 spellcheck_service->GetCustomDictionary(); | 1130 spellcheck_service->GetCustomDictionary(); |
1131 OnLoaded(*custom_dictionary, WordList()); | 1131 OnLoaded(*custom_dictionary, WordList()); |
1132 EXPECT_FALSE(custom_dictionary->HasWord("foo")); | 1132 EXPECT_FALSE(custom_dictionary->HasWord("foo")); |
1133 EXPECT_FALSE(custom_dictionary->HasWord("bar")); | 1133 EXPECT_FALSE(custom_dictionary->HasWord("bar")); |
1134 custom_dictionary->AddWord("foo"); | 1134 custom_dictionary->AddWord("foo"); |
1135 EXPECT_TRUE(custom_dictionary->HasWord("foo")); | 1135 EXPECT_TRUE(custom_dictionary->HasWord("foo")); |
1136 EXPECT_FALSE(custom_dictionary->HasWord("bar")); | 1136 EXPECT_FALSE(custom_dictionary->HasWord("bar")); |
1137 } | 1137 } |
OLD | NEW |