|
@@ -1,108 +0,0 @@
|
|
|
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
-From: VerteDinde <[email protected]>
|
|
|
-Date: Mon, 15 Aug 2022 21:51:18 -0700
|
|
|
-Subject: Revert "[SpellCheck] Fully launch spell check delayed initialization"
|
|
|
-
|
|
|
-This reverts commit bf1a502a147c3208d7bb9106fb3aa71b4eee3cf6.
|
|
|
-Delaying spell check initialization is causing specs for
|
|
|
-'custom dictionary word list API' to fail in Electron. This patch
|
|
|
-can be reverted when those failures are addressed. It's unlikely
|
|
|
-that this patch will be upstreamed.
|
|
|
-
|
|
|
-diff --git a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc
|
|
|
-index bf355ff4813e9b8c822b7c2b65cd3d1e3452fb2a..99eafce374f6914e18f278f945a0ea5ca1aabb3c 100644
|
|
|
---- a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc
|
|
|
-+++ b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc
|
|
|
-@@ -290,24 +290,7 @@ TEST_F(LanguageSettingsPrivateApiTest, GetNeverTranslateLanguagesListTest) {
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
--class LanguageSettingsPrivateApiGetLanguageListTest
|
|
|
-- : public LanguageSettingsPrivateApiTest {
|
|
|
-- public:
|
|
|
-- LanguageSettingsPrivateApiGetLanguageListTest() = default;
|
|
|
-- ~LanguageSettingsPrivateApiGetLanguageListTest() override = default;
|
|
|
--
|
|
|
-- protected:
|
|
|
-- void InitFeatures() override {
|
|
|
--#if BUILDFLAG(IS_WIN)
|
|
|
-- // Disable the delayed init feature since that case is tested in
|
|
|
-- // LanguageSettingsPrivateApiTestDelayInit below.
|
|
|
-- feature_list_.InitAndDisableFeature(
|
|
|
-- spellcheck::kWinDelaySpellcheckServiceInit);
|
|
|
--#endif // BUILDFLAG(IS_WIN)
|
|
|
-- }
|
|
|
--};
|
|
|
--
|
|
|
--TEST_F(LanguageSettingsPrivateApiGetLanguageListTest, GetLanguageList) {
|
|
|
-+TEST_F(LanguageSettingsPrivateApiTest, GetLanguageListTest) {
|
|
|
- translate::TranslateDownloadManager::GetInstance()->ResetForTesting();
|
|
|
- RunGetLanguageListTest();
|
|
|
- }
|
|
|
-diff --git a/chrome/browser/spellchecker/spellcheck_service_unittest.cc b/chrome/browser/spellchecker/spellcheck_service_unittest.cc
|
|
|
-index f982882ed166c5abfecadbbf89fe8771908c35f5..b0be80e0622237c54749e9e645a44fb7e24c0c79 100644
|
|
|
---- a/chrome/browser/spellchecker/spellcheck_service_unittest.cc
|
|
|
-+++ b/chrome/browser/spellchecker/spellcheck_service_unittest.cc
|
|
|
-@@ -333,17 +333,9 @@ const std::vector<std::string> SpellcheckServiceHybridUnitTestBase::
|
|
|
- // dictionaries.
|
|
|
- };
|
|
|
-
|
|
|
--class GetDictionariesHybridUnitTestNoDelayInit
|
|
|
-+class SpellcheckServiceHybridUnitTest
|
|
|
- : public SpellcheckServiceHybridUnitTestBase,
|
|
|
-- public testing::WithParamInterface<TestCase> {
|
|
|
-- protected:
|
|
|
-- void InitFeatures() override {
|
|
|
-- // Disable kWinDelaySpellcheckServiceInit, as the case where it's enabled
|
|
|
-- // is tested in SpellcheckServiceWindowsDictionaryMappingUnitTestDelayInit.
|
|
|
-- feature_list_.InitAndDisableFeature(
|
|
|
-- spellcheck::kWinDelaySpellcheckServiceInit);
|
|
|
-- }
|
|
|
--};
|
|
|
-+ public testing::WithParamInterface<TestCase> {};
|
|
|
-
|
|
|
- static const TestCase kHybridGetDictionariesParams[] = {
|
|
|
- // Galician (gl) has only Windows support, no Hunspell dictionary. Croatian
|
|
|
-@@ -398,10 +390,10 @@ static const TestCase kHybridGetDictionariesParams[] = {
|
|
|
- };
|
|
|
-
|
|
|
- INSTANTIATE_TEST_SUITE_P(TestCases,
|
|
|
-- GetDictionariesHybridUnitTestNoDelayInit,
|
|
|
-+ SpellcheckServiceHybridUnitTest,
|
|
|
- testing::ValuesIn(kHybridGetDictionariesParams));
|
|
|
-
|
|
|
--TEST_P(GetDictionariesHybridUnitTestNoDelayInit, GetDictionaries) {
|
|
|
-+TEST_P(SpellcheckServiceHybridUnitTest, GetDictionaries) {
|
|
|
- RunGetDictionariesTest(GetParam().accept_languages,
|
|
|
- GetParam().spellcheck_dictionaries,
|
|
|
- GetParam().expected_dictionaries);
|
|
|
-@@ -431,15 +423,7 @@ std::ostream& operator<<(std::ostream& out,
|
|
|
-
|
|
|
- class SpellcheckServiceWindowsDictionaryMappingUnitTest
|
|
|
- : public SpellcheckServiceHybridUnitTestBase,
|
|
|
-- public testing::WithParamInterface<DictionaryMappingTestCase> {
|
|
|
-- protected:
|
|
|
-- void InitFeatures() override {
|
|
|
-- // Disable kWinDelaySpellcheckServiceInit, as the case where it's enabled
|
|
|
-- // is tested in SpellcheckServiceWindowsDictionaryMappingUnitTestDelayInit.
|
|
|
-- feature_list_.InitAndDisableFeature(
|
|
|
-- spellcheck::kWinDelaySpellcheckServiceInit);
|
|
|
-- }
|
|
|
--};
|
|
|
-+ public testing::WithParamInterface<DictionaryMappingTestCase> {};
|
|
|
-
|
|
|
- static const DictionaryMappingTestCase kHybridDictionaryMappingsParams[] = {
|
|
|
- DictionaryMappingTestCase({"en-CA", "en-CA", "en-CA", "en", "en"}),
|
|
|
-diff --git a/components/spellcheck/common/spellcheck_features.cc b/components/spellcheck/common/spellcheck_features.cc
|
|
|
-index c1b7636ea528c8162d71e2f71b2414e3ebb7a9f8..4927c08e372338619f8c43d693a8cf6196101933 100644
|
|
|
---- a/components/spellcheck/common/spellcheck_features.cc
|
|
|
-+++ b/components/spellcheck/common/spellcheck_features.cc
|
|
|
-@@ -43,7 +43,7 @@ ScopedDisableBrowserSpellCheckerForTesting::
|
|
|
-
|
|
|
- BASE_FEATURE(kWinDelaySpellcheckServiceInit,
|
|
|
- "WinDelaySpellcheckServiceInit",
|
|
|
-- base::FEATURE_ENABLED_BY_DEFAULT);
|
|
|
-+ base::FEATURE_DISABLED_BY_DEFAULT);
|
|
|
-
|
|
|
- BASE_FEATURE(kWinRetrieveSuggestionsOnlyOnDemand,
|
|
|
- "WinRetrieveSuggestionsOnlyOnDemand",
|