chore: remove unnecessary spellchecker revert patch (#38248)
This commit is contained in:
parent
a1b2dae68e
commit
c2d7164021
3 changed files with 6 additions and 112 deletions
|
@ -107,7 +107,6 @@ short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch
|
|||
chore_add_electron_deps_to_gitignores.patch
|
||||
chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch
|
||||
add_maximized_parameter_to_linuxui_getwindowframeprovider.patch
|
||||
revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch
|
||||
add_electron_deps_to_license_credits_file.patch
|
||||
fix_crash_loading_non-standard_schemes_in_iframes.patch
|
||||
fix_return_v8_value_from_localframe_requestexecutescript.patch
|
||||
|
|
|
@ -1,108 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: VerteDinde <keeleymhammond@gmail.com>
|
||||
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",
|
|
@ -41,10 +41,13 @@ void InitializeFeatureList() {
|
|||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// Disable async spellchecker suggestions for Windows, which causes
|
||||
// an empty suggestions list to be returned
|
||||
disable_features +=
|
||||
std::string(",") + spellcheck::kWinRetrieveSuggestionsOnlyOnDemand.name;
|
||||
// Disable async spellchecker suggestions for Windows, which causes
|
||||
// an empty suggestions list to be returned
|
||||
std::string(",") + spellcheck::kWinRetrieveSuggestionsOnlyOnDemand.name +
|
||||
// Delayed spellcheck initialization is causing the
|
||||
// 'custom dictionary word list API' spec to crash.
|
||||
std::string(",") + spellcheck::kWinDelaySpellcheckServiceInit.name;
|
||||
#endif
|
||||
base::FeatureList::InitializeInstance(enable_features, disable_features);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue