Source/WebCore: Remove unused unified textchecker variable
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Mar 2013 21:28:38 +0000 (21:28 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Mar 2013 21:28:38 +0000 (21:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=112362

Patch by Rouslan Solomakhin <rouslan@chromium.org> on 2013-03-15
Reviewed by Tony Chang.

The variable m_originalUnifiedSpellCheckerEnabled is never used. The generated
code from Settings.in already backs up and restores unified textchecker setting.

* testing/InternalSettings.h: Remove unusued m_originalUnifiedSpellCheckerEnabled variable.

Tools: Remove setAsynchronousSpellCheckingEnabled from test runners
https://bugs.webkit.org/show_bug.cgi?id=112362

Patch by Rouslan Solomakhin <rouslan@chromium.org> on 2013-03-15
Reviewed by Tony Chang.

Remove setAsynchronousSpellCheckingEnabled from test runners. The setting is now
in internals.settings, so all ports can share it.

* DumpRenderTree/TestRunner.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
* DumpRenderTree/TestRunner.h: Remove setAsynchronousSpellCheckingEnabled() method.
* DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
* DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
* DumpRenderTree/chromium/TestRunner/src/TestRunner.h: Remove setAsynchronousSpellCheckingEnabled() method.
* DumpRenderTree/efl/TestRunnerEfl.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
* DumpRenderTree/gtk/TestRunnerGtk.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
* DumpRenderTree/mac/TestRunnerMac.mm: Remove setAsynchronousSpellCheckingEnabled() method.
* DumpRenderTree/qt/TestRunnerQt.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
* DumpRenderTree/qt/TestRunnerQt.h: Remove setAsynchronousSpellCheckingEnabled() method.
* DumpRenderTree/win/TestRunnerWin.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
* DumpRenderTree/wx/TestRunnerWx.cpp: Remove setAsynchronousSpellCheckingEnabled() method.

LayoutTests: Move setAsynchronousSpellCheckingEnabled to internals.settings
https://bugs.webkit.org/show_bug.cgi?id=112362

Patch by Rouslan Solomakhin <rouslan@chromium.org> on 2013-03-15
Reviewed by Tony Chang.

Changed the tests from using testRunner.setAsynchronousSpellCheckingEnabled(bool)
with port-specific implementations to use internals.settings.setAsynchronousSpellCheckingEnabled(bool)
with one common implementation, similar to internals.settings.setUnifiedTextCheckerEnabled(bool).
Changed the tests to not reset these settings when they finish, because the test harness resets
the settings automatically.

* editing/spelling/grammar-markers-hidpi.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
* editing/spelling/grammar-markers.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
* editing/spelling/grammar-paste.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
* editing/spelling/resources/util.js: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
* editing/spelling/script-tests/spellcheck-paste.js: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
* editing/spelling/spellcheck-async-mutation.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
* editing/spelling/spellcheck-async-remove-frame.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
* editing/spelling/spellcheck-async.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
* editing/spelling/spellcheck-paste-disabled.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
* editing/spelling/spellcheck-queue.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
* editing/spelling/spellcheck-sequencenum.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
* editing/spelling/spelling-marker-description.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
* platform/chromium/editing/spelling/delete-misspelled-word.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
* platform/chromium/editing/spelling/move-cursor-to-misspelled-word.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145940 268f45cc-cd09-0410-ab3c-d52691b4dbfc

30 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/spelling/grammar-markers-hidpi.html
LayoutTests/editing/spelling/grammar-markers.html
LayoutTests/editing/spelling/grammar-paste.html
LayoutTests/editing/spelling/resources/util.js
LayoutTests/editing/spelling/script-tests/spellcheck-paste.js
LayoutTests/editing/spelling/spellcheck-async-mutation.html
LayoutTests/editing/spelling/spellcheck-async-remove-frame.html
LayoutTests/editing/spelling/spellcheck-async.html
LayoutTests/editing/spelling/spellcheck-paste-disabled.html
LayoutTests/editing/spelling/spellcheck-queue.html
LayoutTests/editing/spelling/spellcheck-sequencenum.html
LayoutTests/editing/spelling/spelling-marker-description.html
LayoutTests/platform/chromium/editing/spelling/delete-misspelled-word.html
LayoutTests/platform/chromium/editing/spelling/move-cursor-to-misspelled-word.html
Source/WebCore/ChangeLog
Source/WebCore/testing/InternalSettings.h
Tools/ChangeLog
Tools/DumpRenderTree/TestRunner.cpp
Tools/DumpRenderTree/TestRunner.h
Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp
Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp
Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h
Tools/DumpRenderTree/efl/TestRunnerEfl.cpp
Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp
Tools/DumpRenderTree/mac/TestRunnerMac.mm
Tools/DumpRenderTree/qt/TestRunnerQt.cpp
Tools/DumpRenderTree/qt/TestRunnerQt.h
Tools/DumpRenderTree/win/TestRunnerWin.cpp
Tools/DumpRenderTree/wx/TestRunnerWx.cpp

index 931e747..99d8976 100644 (file)
@@ -1,3 +1,31 @@
+2013-03-15  Rouslan Solomakhin  <rouslan@chromium.org>
+
+        Move setAsynchronousSpellCheckingEnabled to internals.settings
+        https://bugs.webkit.org/show_bug.cgi?id=112362
+
+        Reviewed by Tony Chang.
+
+        Changed the tests from using testRunner.setAsynchronousSpellCheckingEnabled(bool)
+        with port-specific implementations to use internals.settings.setAsynchronousSpellCheckingEnabled(bool)
+        with one common implementation, similar to internals.settings.setUnifiedTextCheckerEnabled(bool).
+        Changed the tests to not reset these settings when they finish, because the test harness resets
+        the settings automatically.
+
+        * editing/spelling/grammar-markers-hidpi.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
+        * editing/spelling/grammar-markers.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
+        * editing/spelling/grammar-paste.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
+        * editing/spelling/resources/util.js: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
+        * editing/spelling/script-tests/spellcheck-paste.js: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
+        * editing/spelling/spellcheck-async-mutation.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
+        * editing/spelling/spellcheck-async-remove-frame.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
+        * editing/spelling/spellcheck-async.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
+        * editing/spelling/spellcheck-paste-disabled.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
+        * editing/spelling/spellcheck-queue.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
+        * editing/spelling/spellcheck-sequencenum.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
+        * editing/spelling/spelling-marker-description.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
+        * platform/chromium/editing/spelling/delete-misspelled-word.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
+        * platform/chromium/editing/spelling/move-cursor-to-misspelled-word.html: Use internals.settings.setAsynchronousSpellCheckingEnabled(bool) instead of testRunner.setAsynchronousSpellCheckingEnabled(bool).
+
 2013-03-14  Ojan Vafai  <ojan@chromium.org>
 
         Auto height column flexboxes with border and padding are too short
index 10119ec..0846a2f 100644 (file)
@@ -5,10 +5,11 @@
 <div id="source" contenteditable="true" spellcheck="false">You has the right.</div>
 <div id="target" contenteditable="true" spellcheck="true"></div>
 <script>
+if (window.internals)
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
 if (window.testRunner) {
     testRunner.waitUntilDone();
     testRunner.dumpAsText(true);
-    testRunner.setAsynchronousSpellCheckingEnabled(true);
     testRunner.setBackingScaleFactor(2, function () {
         trial();
     });
@@ -25,10 +26,8 @@ var retry = 10;
 function trial() {
     var hasMarker = internals.hasGrammarMarker(target, 4, 3);
     if (hasMarker || --retry == 0) {
-        if (window.testRunner) {
-            testRunner.setAsynchronousSpellCheckingEnabled(false);
+        if (window.testRunner)
             testRunner.notifyDone();
-        }
         return;
     }
     window.setTimeout(trial, 10);
index 2a91888..e082bf6 100644 (file)
@@ -8,8 +8,9 @@
 if (window.testRunner) {
     testRunner.waitUntilDone();
     testRunner.dumpAsText(true);
-    testRunner.setAsynchronousSpellCheckingEnabled(true);
 }
+if (window.internals)
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
 
 var source = document.getElementById('source');
 window.getSelection().selectAllChildren(source);
@@ -22,10 +23,8 @@ var retry = 10;
 function trial() {
     var hasMarker = internals.hasGrammarMarker(target, 4, 3);
     if (hasMarker || --retry == 0) {
-        if (window.testRunner) {
-            testRunner.setAsynchronousSpellCheckingEnabled(false);
+        if (window.testRunner)
             testRunner.notifyDone();
-        }
         return;
     }
     window.setTimeout(trial, 10);
index 78ddca7..a7c23ad 100644 (file)
@@ -48,8 +48,6 @@ function done()
     if (next)
         return window.setTimeout(next, 0);
     testRoot.style.display = "none";
-
-    testRunner.setAsynchronousSpellCheckingEnabled(false);
     testRunner.notifyDone();
 }
 
@@ -136,9 +134,8 @@ function pasteAndVerify(source, dest, expectedMarked)
     trial();
 };
 
-if (window.testRunner) {
-    testRunner.setAsynchronousSpellCheckingEnabled(true);
-}
+if (window.internals)
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
 
 tests.push(function() { pasteAndVerify(testSourcePlain, testEditable, ["has"]); });
 tests.push(function() { pasteAndVerify(testSourceDecorated, testEditable, ["a"]); }); // Checks only 'a'.
index 094a53b..bc15e0e 100644 (file)
@@ -20,13 +20,13 @@ function verifySpellTest(nretry)
 
 function initSpellTest(testElementId, testText, testFunction)
 {
-    if (!window.internals || !window.testRunner || !window.testRunner.setAsynchronousSpellCheckingEnabled) {
+    if (!window.internals || !window.testRunner) {
         log("FAIL Incomplete test environment");
         return;
     }
     testFunctionCallback = testFunction;
     jsTestIsAsync = true;
-    testRunner.setAsynchronousSpellCheckingEnabled(true);
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
     internals.settings.setSmartInsertDeleteEnabled(true);
     internals.settings.setSelectTrailingWhitespaceEnabled(false);
     internals.settings.setUnifiedTextCheckerEnabled(true);
index f309a87..5d48ed0 100644 (file)
@@ -39,8 +39,6 @@ function done()
     if (next)
         return window.setTimeout(next, 0);
     testRoot.style.display = "none";
-
-    testRunner.setAsynchronousSpellCheckingEnabled(false);
     testRunner.notifyDone();
 }
 
@@ -94,8 +92,8 @@ function pasteAndVerify(source, dest, expectedMarked)
     trial();
 };
 
-if (window.testRunner)
-    testRunner.setAsynchronousSpellCheckingEnabled(true);
+if (window.internals)
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
 
 tests.push(function() { pasteAndVerify(testSourcePlain, testInput, [[0, 2]]); });
 tests.push(function() { pasteAndVerify(testSourceDecorated, testInput, [[0, 2]]); });
index 4b082e2..6f2c0d8 100644 (file)
@@ -30,13 +30,13 @@ description(
 
 var jsTestIsAsync = true;
 
-if (window.testRunner) {
+if (window.testRunner)
     testRunner.dumpAsText();
-    testRunner.setAsynchronousSpellCheckingEnabled(true);
-}
 
-if (window.internals)
+if (window.internals) {
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
     internals.settings.setUnifiedTextCheckerEnabled(true);
+}
 
 var sourceIds = ['source'];
 var destElems = ['textarea', 'input', 'contenteditable'];
@@ -76,13 +76,8 @@ function doTestIfAny() {
     removeAllChildren(document.getElementById('container'));
     removeAllChildren(document.getElementById('move-target'));
 
-    if (window.internals)
-        internals.settings.setUnifiedTextCheckerEnabled(false);
-
-    if (window.testRunner) {
-        testRunner.setAsynchronousSpellCheckingEnabled(false);
+    if (window.testRunner)
         finishJSTest();
-    }
 }
 
 var requestId;
index 6df850f..c78f9e0 100644 (file)
@@ -5,7 +5,7 @@
 if (window.testRunner) {
     testRunner.waitUntilDone();
     testRunner.dumpAsText();
-    testRunner.setAsynchronousSpellCheckingEnabled(true);
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
     internals.settings.setUnifiedTextCheckerEnabled(true);
 }
 
index 02383c8..4087e8f 100644 (file)
@@ -22,12 +22,13 @@ description("Test for Unified Spell Checker & Async Spell Checker.");
 
 if (window.testRunner) {
     testRunner.dumpAsText();
-    testRunner.setAsynchronousSpellCheckingEnabled(true);
     testRunner.waitUntilDone();
 }
 
-if (window.internals)
+if (window.internals) {
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
     internals.settings.setUnifiedTextCheckerEnabled(true);
+}
 
 var container = document.getElementById('container');
 function removeChildren(node) {
@@ -56,13 +57,8 @@ function doTestIfAny() {
 
     // No more tests.
     removeChildren(container);
-    if (window.internals)
-        internals.settings.setUnifiedTextCheckerEnabled(false);
-
-    if (window.testRunner) {
-        testRunner.setAsynchronousSpellCheckingEnabled(false);
+    if (window.testRunner)
         testRunner.notifyDone();
-    }
 }
 
 function createEditableElement(id) {
index 91e249b..89feb8f 100644 (file)
@@ -31,7 +31,7 @@ shouldBeTrue('internals.hasSpellingMarker(document, 0, 2)');
 window.getSelection().selectAllChildren(srcNode);
 document.execCommand('Copy');
 
-testRunner.setAsynchronousSpellCheckingEnabled(true);
+internals.settings.setAsynchronousSpellCheckingEnabled(true);
 
 var dstNode = document.getElementById('dst');
 dstNode.focus();
@@ -51,7 +51,6 @@ function verifyMarker() {
         testFailed('The destination node should not have a marker.');
     else
         testPassed('The destination node does not have any markers.');
-    testRunner.setAsynchronousSpellCheckingEnabled(false);
     finishJSTest();
 }
 window.setTimeout(verifyMarker, sleepPeriod);
index c71e3d5..b7205ae 100644 (file)
 <script>
 description('For Bug 72939: Asynchronous SpellChecker should consider multiple requests.');
 
-if (window.testRunner) {
+if (window.testRunner)
     testRunner.waitUntilDone();
-    testRunner.setAsynchronousSpellCheckingEnabled(true);
-}
+if (window.internals)
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
 
 var testRoot = document.createElement("div");
 document.body.insertBefore(testRoot, document.body.firstChild);
@@ -80,10 +80,8 @@ function verifyIfAny()
     }
 
     testRoot.style.display = "none";
-    if (window.testRunner) {
-        testRunner.setAsynchronousSpellCheckingEnabled(false);
+    if (window.testRunner)
         testRunner.notifyDone();
-    }
 }
 
 function findFirstTextNode(node)
index 4543fd5..0d0e677 100644 (file)
@@ -10,9 +10,9 @@
 <script>
 description('For Bug 73511: Internals should have a method to return the max sequence number of spellcheck request.');
 
-if (window.testRunner) {
+if (window.internals) {
     window.jsTestIsAsync = true;
-    testRunner.setAsynchronousSpellCheckingEnabled(true);
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
 }
 
 var testRoot = document.createElement("div");
@@ -77,10 +77,7 @@ function verifyIfAny()
     }
 
     testRoot.style.display = "none";
-    if (window.testRunner) {
-        testRunner.setAsynchronousSpellCheckingEnabled(false);
-        finishJSTest();
-    }
+    finishJSTest();
 }
 
 function copyAndPaste(source, dest)
index 3b2c556..6264c55 100644 (file)
 
 <script>
 
-function done()
-{
-    testRunner.setAsynchronousSpellCheckingEnabled(false);
-    internals.settings.setUnifiedTextCheckerEnabled(false);
-    finishJSTest()
-}
-
 function verify(nretry)
 {
     if (!nretry) {
-       done();
+       finishJSTest()
        return;
     }
 
@@ -37,7 +30,7 @@ function verify(nretry)
     if (markedText != null) {
         shouldBeEqualToString("markedText", "wellcome");
         shouldBeEqualToString("markerDescription", "welcome");
-        done();
+        finishJSTest();
     }
 
     // Wait until the async spellchecking is done.
@@ -48,7 +41,7 @@ function test()
 {
     jsTestIsAsync = true;
     internals.settings.setUnifiedTextCheckerEnabled(true);
-    testRunner.setAsynchronousSpellCheckingEnabled(true);
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
 
     var sel = window.getSelection();
     var destination = document.getElementById("destination");
index 59ada5d..1e36f1a 100644 (file)
@@ -21,7 +21,7 @@ function insertText(text) {
 shouldBeTrue('insertText("z"); insertText("z"); insertText(" "); internals.hasSpellingMarker(document, 0, 2)');
 
 debug('Enable asynchronous spellchecking, delete two characters, and insert a space');
-testRunner.setAsynchronousSpellCheckingEnabled(true);
+internals.settings.setAsynchronousSpellCheckingEnabled(true);
 internals.settings.setUnifiedTextCheckerEnabled(true);
 
 testRunner.execCommand("DeleteBackward");
@@ -36,8 +36,6 @@ function verifyMarker() {
         return;
     }
     shouldBeFalse('internals.hasSpellingMarker(document, 0, 1)');
-    internals.settings.setUnifiedTextCheckerEnabled(false);
-    testRunner.setAsynchronousSpellCheckingEnabled(false);
     finishJSTest();
 }
 window.setTimeout(verifyMarker, 1);
index 60fc02e..31d7d58 100644 (file)
@@ -10,7 +10,7 @@ description('Test if Chrome WebKit does not remove a misspelled marker when movi
             'To test manually, type a misspelled word "zz " and type a left-arrow key to move the cursor on it.' +
             'This test succeeds when "zz" is marked as misspelled.');
 
-testRunner.setAsynchronousSpellCheckingEnabled(true);
+internals.settings.setAsynchronousSpellCheckingEnabled(true);
 var node = document.getElementById('src');
 node.focus();
 document.execCommand("InsertText", false, 'z');
@@ -18,7 +18,6 @@ document.execCommand("InsertText", false, 'z');
 document.execCommand("InsertText", false, ' ');
 window.getSelection().modify('move', 'backward', 'character');
 shouldBeTrue('internals.hasSpellingMarker(document, 0, 2)');
-testRunner.setAsynchronousSpellCheckingEnabled(false);
 </script>
 <script src="../../../../fast/js/resources/js-test-post.js"></script>
 </body>
index 4052918..dbc39dd 100644 (file)
@@ -1,3 +1,15 @@
+2013-03-15  Rouslan Solomakhin  <rouslan@chromium.org>
+
+        Remove unused unified textchecker variable
+        https://bugs.webkit.org/show_bug.cgi?id=112362
+
+        Reviewed by Tony Chang.
+
+        The variable m_originalUnifiedSpellCheckerEnabled is never used. The generated
+        code from Settings.in already backs up and restores unified textchecker setting.
+
+        * testing/InternalSettings.h: Remove unusued m_originalUnifiedSpellCheckerEnabled variable.
+
 2013-03-14  Ojan Vafai  <ojan@chromium.org>
 
         Auto height column flexboxes with border and padding are too short
index 549b0fa..18742e2 100644 (file)
@@ -60,7 +60,6 @@ public:
         bool m_originalStyleScoped;
 #endif
         EditingBehaviorType m_originalEditingBehavior;
-        bool m_originalUnifiedSpellCheckerEnabled;
 #if ENABLE(TEXT_AUTOSIZING)
         bool m_originalTextAutosizingEnabled;
         IntSize m_originalTextAutosizingWindowSizeOverride;
index 5b9ef5f..dbe1445 100644 (file)
@@ -1,3 +1,26 @@
+2013-03-15  Rouslan Solomakhin  <rouslan@chromium.org>
+
+        Remove setAsynchronousSpellCheckingEnabled from test runners
+        https://bugs.webkit.org/show_bug.cgi?id=112362
+
+        Reviewed by Tony Chang.
+
+        Remove setAsynchronousSpellCheckingEnabled from test runners. The setting is now
+        in internals.settings, so all ports can share it.
+
+        * DumpRenderTree/TestRunner.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
+        * DumpRenderTree/TestRunner.h: Remove setAsynchronousSpellCheckingEnabled() method.
+        * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
+        * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
+        * DumpRenderTree/chromium/TestRunner/src/TestRunner.h: Remove setAsynchronousSpellCheckingEnabled() method.
+        * DumpRenderTree/efl/TestRunnerEfl.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
+        * DumpRenderTree/gtk/TestRunnerGtk.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
+        * DumpRenderTree/mac/TestRunnerMac.mm: Remove setAsynchronousSpellCheckingEnabled() method.
+        * DumpRenderTree/qt/TestRunnerQt.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
+        * DumpRenderTree/qt/TestRunnerQt.h: Remove setAsynchronousSpellCheckingEnabled() method.
+        * DumpRenderTree/win/TestRunnerWin.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
+        * DumpRenderTree/wx/TestRunnerWx.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
+
 2013-03-15  Simon Fraser  <simon.fraser@apple.com>
 
         Fix the stupid unit tests.
index daeccaf..7684ad1 100644 (file)
@@ -1523,16 +1523,6 @@ static JSValueRef setStopProvisionalFrameLoadsCallback(JSContextRef context, JSO
     return JSValueMakeUndefined(context);
 }
 
-static JSValueRef setAsynchronousSpellCheckingEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
-    if (argumentCount < 1)
-        return JSValueMakeUndefined(context);
-
-    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
-    controller->setAsynchronousSpellCheckingEnabled(JSValueToBoolean(context, arguments[0]));
-    return JSValueMakeUndefined(context);
-}
-
 static JSValueRef showWebInspectorCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
@@ -2134,7 +2124,6 @@ JSStaticFunction* TestRunner::staticFunctions()
         { "setWindowIsKey", setWindowIsKeyCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setJavaScriptCanAccessClipboard", setJavaScriptCanAccessClipboardCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setXSSAuditorEnabled", setXSSAuditorEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "setAsynchronousSpellCheckingEnabled", setAsynchronousSpellCheckingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "showWebInspector", showWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "simulateLegacyWebNotificationClick", simulateLegacyWebNotificationClickCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "testOnscreen", testOnscreenCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
index 17fb408..f23ab12 100644 (file)
@@ -289,7 +289,6 @@ public:
     bool geolocationPermission() const { return m_geolocationPermission; }
 
     void setDeveloperExtrasEnabled(bool);
-    void setAsynchronousSpellCheckingEnabled(bool);
     void showWebInspector();
     void closeWebInspector();
     void evaluateInWebInspector(long callId, JSStringRef script);
index bd2f034..0b2d58f 100644 (file)
@@ -572,11 +572,6 @@ void TestRunner::deleteAllLocalStorage()
     notImplemented();
 }
 
-void TestRunner::setAsynchronousSpellCheckingEnabled(bool)
-{
-    notImplemented();
-}
-
 int TestRunner::numberOfPendingGeolocationPermissionRequests()
 {
     return DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page());
index 40fb456..56fffd7 100644 (file)
@@ -225,7 +225,6 @@ TestRunner::TestRunner(TestInterfaces* interfaces)
     bindMethod("setAllowFileAccessFromFileURLs", &TestRunner::setAllowFileAccessFromFileURLs);
     bindMethod("overridePreference", &TestRunner::overridePreference);
     bindMethod("setPluginsEnabled", &TestRunner::setPluginsEnabled);
-    bindMethod("setAsynchronousSpellCheckingEnabled", &TestRunner::setAsynchronousSpellCheckingEnabled);
     bindMethod("setTouchDragDropEnabled", &TestRunner::setTouchDragDropEnabled);
 
     // The following modify the state of the TestRunner.
@@ -1654,15 +1653,6 @@ void TestRunner::setPluginsEnabled(const CppArgumentList& arguments, CppVariant*
     result->setNull();
 }
 
-void TestRunner::setAsynchronousSpellCheckingEnabled(const CppArgumentList& arguments, CppVariant* result)
-{
-    if (arguments.size() > 0 && arguments[0].isBool()) {
-        m_delegate->preferences()->asynchronousSpellCheckingEnabled = cppVariantToBool(arguments[0]);
-        m_delegate->applyPreferences();
-    }
-    result->setNull();
-}
-
 void TestRunner::setTouchDragDropEnabled(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool()) {
index 1b0c6d4..02291f9 100644 (file)
@@ -302,9 +302,6 @@ private:
     // Enable or disable plugins.
     void setPluginsEnabled(const CppArgumentList&, CppVariant*);
 
-    // Changes asynchronous spellchecking flag on the settings.
-    void setAsynchronousSpellCheckingEnabled(const CppArgumentList&, CppVariant*);
-
     void setTouchDragDropEnabled(const CppArgumentList&, CppVariant*);
 
     ///////////////////////////////////////////////////////////////////////////
index a99a3b5..a43ae06 100644 (file)
@@ -679,11 +679,6 @@ void TestRunner::setDeveloperExtrasEnabled(bool enabled)
     ewk_view_setting_enable_developer_extras_set(browser->mainView(), enabled);
 }
 
-void TestRunner::setAsynchronousSpellCheckingEnabled(bool)
-{
-    notImplemented();
-}
-
 void TestRunner::showWebInspector()
 {
     ewk_view_inspector_show(browser->mainView());
index cd1044d..bff0115 100644 (file)
@@ -779,11 +779,6 @@ void TestRunner::setDeveloperExtrasEnabled(bool enabled)
     g_object_set(webSettings, "enable-developer-extras", enabled, NULL);
 }
 
-void TestRunner::setAsynchronousSpellCheckingEnabled(bool)
-{
-    // FIXME: Implement this.
-}
-
 void TestRunner::showWebInspector()
 {
     WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
index b31c9ad..f410c75 100644 (file)
@@ -782,11 +782,6 @@ void TestRunner::setDeveloperExtrasEnabled(bool enabled)
     [[[mainFrame webView] preferences] setDeveloperExtrasEnabled:enabled];
 }
 
-void TestRunner::setAsynchronousSpellCheckingEnabled(bool enabled)
-{
-    [[[mainFrame webView] preferences] setAsynchronousSpellCheckingEnabled:enabled];
-}
-
 void TestRunner::showWebInspector()
 {
     [[[mainFrame webView] inspector] show:nil];
index 18d0d7a..1ddf9c5 100644 (file)
@@ -421,11 +421,6 @@ void TestRunnerQt::setDeveloperExtrasEnabled(bool enabled)
     m_drt->webPage()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, enabled);
 }
 
-void TestRunnerQt::setAsynchronousSpellCheckingEnabled(bool)
-{
-    // FIXME: Implement this.
-}
-
 void TestRunnerQt::showWebInspector()
 {
     m_drt->webPage()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
@@ -1168,10 +1163,6 @@ void TestRunner::setStorageDatabaseIdleInterval(double)
 {
 }
 
-void TestRunner::setAsynchronousSpellCheckingEnabled(bool)
-{
-}
-
 void TestRunner::setXSSAuditorEnabled(bool flag)
 {
 }
index 4e3cd99..96a6111 100644 (file)
@@ -128,7 +128,6 @@ public Q_SLOTS:
     QString decodeHostName(const QString& host);
     void dumpSelectionRect() const { }
     void setDeveloperExtrasEnabled(bool);
-    void setAsynchronousSpellCheckingEnabled(bool);
     void showWebInspector();
     void closeWebInspector();
     void evaluateInWebInspector(long callId, const QString& script);
index dd4d873..d5b9810 100644 (file)
@@ -952,11 +952,6 @@ void TestRunner::setDeveloperExtrasEnabled(bool enabled)
     prefsPrivate->setDeveloperExtrasEnabled(enabled);
 }
 
-void TestRunner::setAsynchronousSpellCheckingEnabled(bool)
-{
-    // FIXME: Implement this.
-}
-
 void TestRunner::showWebInspector()
 {
     COMPtr<IWebView> webView;
index f4bb94a..bb8d71a 100644 (file)
@@ -450,11 +450,6 @@ void TestRunner::abortModal()
 {
 }
 
-void TestRunner::setAsynchronousSpellCheckingEnabled(bool)
-{
-    // FIXME: Implement this.
-}
-
 bool TestRunner::findString(JSContextRef context, JSStringRef target, JSObjectRef optionsArray)
 {
     // FIXME: Implement