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

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

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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_host_metrics.h" 22 #include "chrome/browser/spellchecker/spellcheck_host_metrics.h"
23 #include "chrome/browser/spellchecker/spellcheck_service.h" 23 #include "chrome/browser/spellchecker/spellcheck_service.h"
24 #include "chrome/common/chrome_constants.h" 24 #include "chrome/common/chrome_constants.h"
25 #include "chrome/test/base/testing_profile.h" 25 #include "chrome/test/base/testing_profile.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"
28 #include "components/sync/api/sync_change_processor_wrapper_for_test.h"
29 #include "components/sync/api/sync_data.h"
30 #include "components/sync/api/sync_error_factory.h"
31 #include "components/sync/api/sync_error_factory_mock.h"
32 #include "components/sync/protocol/sync.pb.h"
27 #include "content/public/test/test_browser_thread_bundle.h" 33 #include "content/public/test/test_browser_thread_bundle.h"
28 #include "net/url_request/test_url_fetcher_factory.h" 34 #include "net/url_request/test_url_fetcher_factory.h"
29 #include "sync/api/sync_change.h"
30 #include "sync/api/sync_change_processor_wrapper_for_test.h"
31 #include "sync/api/sync_data.h"
32 #include "sync/api/sync_error_factory.h"
33 #include "sync/api/sync_error_factory_mock.h"
34 #include "sync/protocol/sync.pb.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
42 42
43 using base::HistogramBase; 43 using base::HistogramBase;
44 using base::HistogramSamples; 44 using base::HistogramSamples;
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 SpellcheckServiceFactory::GetForContext(&profile_); 1194 SpellcheckServiceFactory::GetForContext(&profile_);
1195 SpellcheckCustomDictionary* custom_dictionary = 1195 SpellcheckCustomDictionary* custom_dictionary =
1196 spellcheck_service->GetCustomDictionary(); 1196 spellcheck_service->GetCustomDictionary();
1197 OnLoaded(*custom_dictionary, base::WrapUnique(new std::set<std::string>)); 1197 OnLoaded(*custom_dictionary, base::WrapUnique(new std::set<std::string>));
1198 EXPECT_FALSE(custom_dictionary->HasWord("foo")); 1198 EXPECT_FALSE(custom_dictionary->HasWord("foo"));
1199 EXPECT_FALSE(custom_dictionary->HasWord("bar")); 1199 EXPECT_FALSE(custom_dictionary->HasWord("bar"));
1200 custom_dictionary->AddWord("foo"); 1200 custom_dictionary->AddWord("foo");
1201 EXPECT_TRUE(custom_dictionary->HasWord("foo")); 1201 EXPECT_TRUE(custom_dictionary->HasWord("foo"));
1202 EXPECT_FALSE(custom_dictionary->HasWord("bar")); 1202 EXPECT_FALSE(custom_dictionary->HasWord("bar"));
1203 } 1203 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698