Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc

Issue 2401223002: [Sync] Renaming sync/api* to sync/model*. (Closed)
Patch Set: Missed a comment in a DEPS file, and rebasing. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "chrome/browser/spellchecker/spellcheck_custom_dictionary.h" 5 #include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/files/file_util.h" 13 #include "base/files/file_util.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/ptr_util.h" 15 #include "base/memory/ptr_util.h"
16 #include "base/metrics/histogram_samples.h" 16 #include "base/metrics/histogram_samples.h"
17 #include "base/metrics/statistics_recorder.h" 17 #include "base/metrics/statistics_recorder.h"
18 #include "base/run_loop.h" 18 #include "base/run_loop.h"
19 #include "base/strings/string_number_conversions.h" 19 #include "base/strings/string_number_conversions.h"
20 #include "build/build_config.h" 20 #include "build/build_config.h"
21 #include "chrome/browser/spellchecker/spellcheck_factory.h" 21 #include "chrome/browser/spellchecker/spellcheck_factory.h"
22 #include "chrome/browser/spellchecker/spellcheck_service.h" 22 #include "chrome/browser/spellchecker/spellcheck_service.h"
23 #include "chrome/common/chrome_constants.h" 23 #include "chrome/common/chrome_constants.h"
24 #include "chrome/test/base/testing_profile.h" 24 #include "chrome/test/base/testing_profile.h"
25 #include "components/spellcheck/browser/spellcheck_host_metrics.h" 25 #include "components/spellcheck/browser/spellcheck_host_metrics.h"
26 #include "components/spellcheck/common/spellcheck_common.h" 26 #include "components/spellcheck/common/spellcheck_common.h"
27 #include "components/sync/api/sync_change.h" 27 #include "components/sync/model/sync_change.h"
28 #include "components/sync/api/sync_change_processor_wrapper_for_test.h" 28 #include "components/sync/model/sync_change_processor_wrapper_for_test.h"
29 #include "components/sync/api/sync_data.h" 29 #include "components/sync/model/sync_data.h"
30 #include "components/sync/api/sync_error_factory.h" 30 #include "components/sync/model/sync_error_factory.h"
31 #include "components/sync/api/sync_error_factory_mock.h" 31 #include "components/sync/model/sync_error_factory_mock.h"
32 #include "components/sync/protocol/sync.pb.h" 32 #include "components/sync/protocol/sync.pb.h"
33 #include "content/public/test/test_browser_thread_bundle.h" 33 #include "content/public/test/test_browser_thread_bundle.h"
34 #include "net/url_request/test_url_fetcher_factory.h" 34 #include "net/url_request/test_url_fetcher_factory.h"
35 #include "testing/gmock/include/gmock/gmock.h" 35 #include "testing/gmock/include/gmock/gmock.h"
36 #include "testing/gtest/include/gtest/gtest.h" 36 #include "testing/gtest/include/gtest/gtest.h"
37 37
38 #if defined(OS_WIN) 38 #if defined(OS_WIN)
39 // For version specific disabled tests below (http://crbug.com/230534). 39 // For version specific disabled tests below (http://crbug.com/230534).
40 #include "base/win/windows_version.h" 40 #include "base/win/windows_version.h"
41 #endif 41 #endif
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 SpellcheckServiceFactory::GetForContext(&profile_); 1193 SpellcheckServiceFactory::GetForContext(&profile_);
1194 SpellcheckCustomDictionary* custom_dictionary = 1194 SpellcheckCustomDictionary* custom_dictionary =
1195 spellcheck_service->GetCustomDictionary(); 1195 spellcheck_service->GetCustomDictionary();
1196 OnLoaded(*custom_dictionary, base::WrapUnique(new std::set<std::string>)); 1196 OnLoaded(*custom_dictionary, base::WrapUnique(new std::set<std::string>));
1197 EXPECT_FALSE(custom_dictionary->HasWord("foo")); 1197 EXPECT_FALSE(custom_dictionary->HasWord("foo"));
1198 EXPECT_FALSE(custom_dictionary->HasWord("bar")); 1198 EXPECT_FALSE(custom_dictionary->HasWord("bar"));
1199 custom_dictionary->AddWord("foo"); 1199 custom_dictionary->AddWord("foo");
1200 EXPECT_TRUE(custom_dictionary->HasWord("foo")); 1200 EXPECT_TRUE(custom_dictionary->HasWord("foo"));
1201 EXPECT_FALSE(custom_dictionary->HasWord("bar")); 1201 EXPECT_FALSE(custom_dictionary->HasWord("bar"));
1202 } 1202 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698