REGRESSION(r150393): editing/inserting/typing-at-end-of-line.html fails
[WebKit-https.git] / Source / WebCore / testing / Internals.cpp
index a6254c4fb16c9fd986a5d4885a47d1a360191386..0410c681a10b734536a6487856989e7750026508 100644 (file)
@@ -285,6 +285,20 @@ void Internals::resetToConsistentState(Page* page)
 #endif
     if (!page->mainFrame()->editor().isContinuousSpellCheckingEnabled())
         page->mainFrame()->editor().toggleContinuousSpellChecking();
+
+#if USE(AUTOMATIC_TEXT_REPLACEMENT)
+    if (page->mainFrame()->editor().isAutomaticQuoteSubstitutionEnabled())
+        page->mainFrame()->editor().toggleAutomaticQuoteSubstitution();
+    if (page->mainFrame()->editor().isAutomaticLinkDetectionEnabled())
+        page->mainFrame()->editor().toggleAutomaticLinkDetection();
+    if (page->mainFrame()->editor().isAutomaticDashSubstitutionEnabled())
+        page->mainFrame()->editor().toggleAutomaticDashSubstitution();
+    if (page->mainFrame()->editor().isAutomaticTextReplacementEnabled())
+        page->mainFrame()->editor().toggleAutomaticTextReplacement();
+    if (!page->mainFrame()->editor().isAutomaticSpellingCorrectionEnabled())
+        page->mainFrame()->editor().toggleAutomaticSpellingCorrection();
+#endif
+
     if (page->mainFrame()->editor().isOverwriteModeEnabled())
         page->mainFrame()->editor().toggleOverwriteModeEnabled();
 }