WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Mar 2013 01:17:41 +0000 (01:17 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Mar 2013 01:17:41 +0000 (01:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=42696

Reviewed by Andreas Kling.

Source/WebCore:

Since the method acts directly on a WebCore element and strictly test
HTMLInputElement::shouldAutoComplete(), the test function is moved to internals.

* testing/Internals.cpp:
(WebCore::Internals::elementShouldAutoComplete):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit/efl:

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
* WebCoreSupport/DumpRenderTreeSupportEfl.h:

Source/WebKit/gtk:

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
* WebCoreSupport/DumpRenderTreeSupportGtk.h:
(DumpRenderTreeSupportGtk):

Source/WebKit/qt:

* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
* WebCoreSupport/DumpRenderTreeSupportQt.h:

Tools:

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

LayoutTests:

* security/set-form-autocomplete-attribute.html: Update the test.
* platform/wk2/TestExpectations: Unskip it for WebKit2.

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

30 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/wk2/TestExpectations
LayoutTests/security/set-form-autocomplete-attribute.html
Source/WebCore/ChangeLog
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
Source/autotools/symbols.filter
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 6d7556b..b3434bb 100644 (file)
@@ -1,3 +1,13 @@
+2013-03-06  Benjamin Poulain  <benjamin@webkit.org>
+
+        WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
+        https://bugs.webkit.org/show_bug.cgi?id=42696
+
+        Reviewed by Andreas Kling.
+
+        * security/set-form-autocomplete-attribute.html: Update the test.
+        * platform/wk2/TestExpectations: Unskip it for WebKit2.
+
 2013-03-06  Dean Jackson  <dino@apple.com>
 
         REGRESSION (r143931): set-cookie-on-redirect.html still breaking subsequent tests
index 80e4ce5..5ea176f 100644 (file)
@@ -221,10 +221,6 @@ printing/single-line-must-not-be-split-into-two-pages.html
 printing/simultaneous-position-float-change.html
 printing/width-overflow.html
 
-# WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
-# <https://bugs.webkit.org/show_bug.cgi?id=42696>
-security/set-form-autocomplete-attribute.html
-
 # WebKitTestRunner needs layoutTestController.setWillSendRequestClearHeader
 # <https://bugs.webkit.org/show_bug.cgi?id=42699>
 http/tests/security/no-referrer.html
index b811ed0..1a39adc 100644 (file)
@@ -12,9 +12,9 @@ function log(message)
     document.getElementById("logger").appendChild(document.createElement('br'));
 }
 
-function logAutoCompleteAPIResult()
+function logAutoCompleteAPIResult(input)
 {
-    if (testRunner.elementDoesAutoCompleteForElementWithId("autoInput"))
+    if (internals.elementShouldAutoComplete(input))
         log("Element does autocomplete");
     else
         log("Element does *not* autocomplete");
@@ -31,41 +31,41 @@ function runTest()
     var input = document.getElementById("autoInput");
     
     // Test with no autocomplete attribute on the <form>
-    logAutoCompleteAPIResult();
+    logAutoCompleteAPIResult(input);
 
     input.setAttribute("autocomplete", "cheese");
-    logAutoCompleteAPIResult();
+    logAutoCompleteAPIResult(input);
 
     input.setAttribute("autocomplete", "off");
-    logAutoCompleteAPIResult();
+    logAutoCompleteAPIResult(input);
 
     input.setAttribute("autocomplete", "on");
-    logAutoCompleteAPIResult();
+    logAutoCompleteAPIResult(input);
 
     input.setAttribute("autocomplete", "cheese");
-    logAutoCompleteAPIResult();
+    logAutoCompleteAPIResult(input);
 
     input.removeAttribute("autocomplete");
-    logAutoCompleteAPIResult();
+    logAutoCompleteAPIResult(input);
     
     // Test with autocomplete="off" on the <form>
     form.setAttribute("autocomplete", "off");
-    logAutoCompleteAPIResult();
+    logAutoCompleteAPIResult(input);
     
     input.setAttribute("autocomplete", "cheese");
-    logAutoCompleteAPIResult();
+    logAutoCompleteAPIResult(input);
 
     input.setAttribute("autocomplete", "off");
-    logAutoCompleteAPIResult();
+    logAutoCompleteAPIResult(input);
 
     input.setAttribute("autocomplete", "on");
-    logAutoCompleteAPIResult();
+    logAutoCompleteAPIResult(input);
 
     input.setAttribute("autocomplete", "cheese");
-    logAutoCompleteAPIResult();
+    logAutoCompleteAPIResult(input);
 
     input.removeAttribute("autocomplete");
-    logAutoCompleteAPIResult();
+    logAutoCompleteAPIResult(input);
 }
 
 </script>
index c87520e..05d24cc 100644 (file)
@@ -1,3 +1,18 @@
+2013-03-06  Benjamin Poulain  <benjamin@webkit.org>
+
+        WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
+        https://bugs.webkit.org/show_bug.cgi?id=42696
+
+        Reviewed by Andreas Kling.
+
+        Since the method acts directly on a WebCore element and strictly test
+        HTMLInputElement::shouldAutoComplete(), the test function is moved to internals.
+
+        * testing/Internals.cpp:
+        (WebCore::Internals::elementShouldAutoComplete):
+        * testing/Internals.h:
+        * testing/Internals.idl:
+
 2013-03-06  Alexey Proskuryakov  <ap@apple.com>
 
         [Mac] Synthetic ResourceResponses cannot be sent over IPC without losing most information
index d1a7e99..2d97064 100644 (file)
@@ -1105,6 +1105,20 @@ bool Internals::wasLastChangeUserEdit(Element* textField, ExceptionCode& ec)
     return false;
 }
 
+bool Internals::elementShouldAutoComplete(Element* element, ExceptionCode& ec)
+{
+    if (!element) {
+        ec = INVALID_ACCESS_ERR;
+        return false;
+    }
+
+    if (HTMLInputElement* inputElement = element->toInputElement())
+        return inputElement->shouldAutocomplete();
+
+    ec = INVALID_NODE_TYPE_ERR;
+    return false;
+}
+
 String Internals::suggestedValue(Element* element, ExceptionCode& ec)
 {
     if (!element) {
index eec383a..c3df973 100644 (file)
@@ -158,6 +158,7 @@ public:
     String configurationForViewport(Document*, float devicePixelRatio, int deviceWidth, int deviceHeight, int availableWidth, int availableHeight, ExceptionCode&);
 
     bool wasLastChangeUserEdit(Element* textField, ExceptionCode&);
+    bool elementShouldAutoComplete(Element* inputElement, ExceptionCode&);
     String suggestedValue(Element* inputElement, ExceptionCode&);
     void setSuggestedValue(Element* inputElement, const String&, ExceptionCode&);
     void setEditingValue(Element* inputElement, const String&, ExceptionCode&);
index 372b098..5f4b1aa 100644 (file)
                                        in long availableHeight) raises(DOMException);
 
     boolean wasLastChangeUserEdit(in Element textField) raises (DOMException);
+    boolean elementShouldAutoComplete(in Element inputElement) raises (DOMException);
     DOMString suggestedValue(in Element inputElement) raises (DOMException);
     void setSuggestedValue(in Element inputElement, in DOMString value) raises (DOMException);
     void setEditingValue(in Element inputElement, in DOMString value) raises (DOMException);
index cd54a7f..b9ad17b 100644 (file)
@@ -1,3 +1,13 @@
+2013-03-06  Benjamin Poulain  <benjamin@webkit.org>
+
+        WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
+        https://bugs.webkit.org/show_bug.cgi?id=42696
+
+        Reviewed by Andreas Kling.
+
+        * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+        * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
 2013-03-05  Geoffrey Garen  <ggaren@apple.com>
 
         Removed some dead code in the page cache
index 38d2e5c..2722165 100644 (file)
@@ -125,21 +125,6 @@ String DumpRenderTreeSupportEfl::layerTreeAsText(const Evas_Object* ewkFrame)
     return frame->layerTreeAsText();
 }
 
-bool DumpRenderTreeSupportEfl::elementDoesAutoCompleteForElementWithId(const Evas_Object* ewkFrame, const String& elementId)
-{
-    DRT_SUPPORT_FRAME_GET_OR_RETURN(ewkFrame, frame, false);
-
-    WebCore::Document* document = frame->document();
-    ASSERT(document);
-
-    WebCore::HTMLInputElement* inputElement = static_cast<WebCore::HTMLInputElement*>(document->getElementById(elementId));
-
-    if (!inputElement)
-        return false;
-
-    return inputElement->isTextField() && !inputElement->isPasswordField() && inputElement->shouldAutocomplete();
-}
-
 Eina_List* DumpRenderTreeSupportEfl::frameChildren(const Evas_Object* ewkFrame)
 {
     DRT_SUPPORT_FRAME_GET_OR_RETURN(ewkFrame, frame, 0);
index d8ff3e5..9705da3 100644 (file)
@@ -57,7 +57,6 @@ public:
     static void clearFrameName(Evas_Object* ewkFrame);
     static void clearOpener(Evas_Object* ewkFrame);
     static String counterValueByElementId(const Evas_Object* ewkFrame, const char* elementId);
-    static bool elementDoesAutoCompleteForElementWithId(const Evas_Object* ewkFrame, const String& elementId);
     static Eina_List* frameChildren(const Evas_Object* ewkFrame);
     static WebCore::Frame* frameParent(const Evas_Object* ewkFrame);
     static void layoutFrame(Evas_Object* ewkFrame);
index 00f845d..3f8b54a 100644 (file)
@@ -1,3 +1,14 @@
+2013-03-06  Benjamin Poulain  <benjamin@webkit.org>
+
+        WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
+        https://bugs.webkit.org/show_bug.cgi?id=42696
+
+        Reviewed by Andreas Kling.
+
+        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+        * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+        (DumpRenderTreeSupportGtk):
+
 2013-03-06  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
 
         [GTK] Return m_inspectorFilesPath if it is not null
index ce4936f..4b6d202 100644 (file)
@@ -673,26 +673,6 @@ void DumpRenderTreeSupportGtk::setStyleScopedEnabled(bool enabled)
 #endif
 }
 
-bool DumpRenderTreeSupportGtk::elementDoesAutoCompleteForElementWithId(WebKitWebFrame* frame, JSStringRef id)
-{
-    Frame* coreFrame = core(frame);
-    if (!coreFrame)
-        return false;
-
-    Document* document = coreFrame->document();
-    ASSERT(document);
-
-    size_t bufferSize = JSStringGetMaximumUTF8CStringSize(id);
-    GOwnPtr<gchar> idBuffer(static_cast<gchar*>(g_malloc(bufferSize)));
-    JSStringGetUTF8CString(id, idBuffer.get(), bufferSize);
-    Node* coreNode = document->getElementById(String::fromUTF8(idBuffer.get()));
-    if (!coreNode || !coreNode->renderer())
-        return false;
-
-    HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(coreNode);
-    return inputElement->isTextField() && !inputElement->isPasswordField() && inputElement->shouldAutocomplete();
-}
-
 void DumpRenderTreeSupportGtk::deliverAllMutationsIfNecessary()
 {
     MutationObserver::deliverAllMutations();
index 09ce722..02fc717 100644 (file)
@@ -69,7 +69,6 @@ public:
     static void layoutFrame(WebKitWebFrame*);
     static void setValueForUser(JSContextRef, JSValueRef, JSStringRef);
     static bool shouldClose(WebKitWebFrame*);
-    static bool elementDoesAutoCompleteForElementWithId(WebKitWebFrame*, JSStringRef);
 
     // WebKitWebView
     static void executeCoreCommandByName(WebKitWebView*, const gchar* name, const gchar* value);
index 9242070..91f9990 100644 (file)
@@ -1,3 +1,13 @@
+2013-03-06  Benjamin Poulain  <benjamin@webkit.org>
+
+        WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
+        https://bugs.webkit.org/show_bug.cgi?id=42696
+
+        Reviewed by Andreas Kling.
+
+        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+        * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
 2013-03-06  Allan Sandfeld Jensen  <allan.jensen@digia.com>
 
         [Qt] Illegal narrowing in tst_qwebhistory
index 8a4e0ec..59f3710 100644 (file)
@@ -416,24 +416,6 @@ QVariantList DumpRenderTreeSupportQt::firstRectForCharacterRange(QWebPageAdapter
     return rect;
 }
 
-bool DumpRenderTreeSupportQt::elementDoesAutoCompleteForElementWithId(QWebFrameAdapter *adapter, const QString& elementId)
-{
-    Frame* coreFrame = adapter->frame;
-    if (!coreFrame)
-        return false;
-
-    Document* doc = coreFrame->document();
-    Q_ASSERT(doc);
-
-    Node* coreNode = doc->getElementById(elementId);
-    if (!coreNode || !coreNode->renderer())
-        return false;
-
-    HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(coreNode);
-
-    return inputElement->isTextField() && !inputElement->isPasswordField() && inputElement->shouldAutocomplete();
-}
-
 void DumpRenderTreeSupportQt::setWindowsBehaviorAsEditingBehavior(QWebPageAdapter* adapter)
 {
     Page* corePage = adapter->page;
index 09809ef..70ff85e 100644 (file)
@@ -122,7 +122,6 @@ public:
     static void clearFrameName(QWebFrameAdapter*);
     static void overwritePluginDirectories();
     static bool hasDocumentElement(QWebFrameAdapter*);
-    static bool elementDoesAutoCompleteForElementWithId(QWebFrameAdapter*, const QString& elementId);
     static void setWindowsBehaviorAsEditingBehavior(QWebPageAdapter*);
 
     static void clearAllApplicationCaches();
index 7ba25d0..ba1154d 100644 (file)
@@ -284,6 +284,7 @@ _ZNK7WebCore4KURL6stringEv;
 _ZN7WebCore9PageGroup18captionPreferencesEv;
 _ZN7WebCore4Page9initGroupEv;
 _ZN7WebCore21markerTextForListItemEPNS_7ElementE;
+_ZNK7WebCore16HTMLInputElement18shouldAutocompleteEv;
 
 local:
 _Z*;
index cbfd400..b99df81 100644 (file)
@@ -1,3 +1,28 @@
+2013-03-06  Benjamin Poulain  <benjamin@webkit.org>
+
+        WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
+        https://bugs.webkit.org/show_bug.cgi?id=42696
+
+        Reviewed by Andreas Kling.
+
+        * DumpRenderTree/TestRunner.cpp:
+        (TestRunner::staticFunctions):
+        * DumpRenderTree/TestRunner.h:
+        (TestRunner):
+        * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+        * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+        (WebTestRunner::TestRunner::TestRunner):
+        * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+        (TestRunner):
+        * DumpRenderTree/efl/TestRunnerEfl.cpp:
+        * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+        * DumpRenderTree/mac/TestRunnerMac.mm:
+        * DumpRenderTree/qt/TestRunnerQt.cpp:
+        * DumpRenderTree/qt/TestRunnerQt.h:
+        (TestRunnerQt):
+        * DumpRenderTree/win/TestRunnerWin.cpp:
+        * DumpRenderTree/wx/TestRunnerWx.cpp:
+
 2013-03-06  Roger Fong  <roger_fong@apple.com>
 
         Re-enable WinEWS test and decrease iterations before clean build back to 10.
index 23b7238..7d3e85e 100644 (file)
@@ -1603,17 +1603,6 @@ static JSValueRef evaluateScriptInIsolatedWorldAndReturnValueCallback(JSContextR
     return JSValueMakeUndefined(context);
 }
 
-static JSValueRef elementDoesAutoCompleteForElementWithIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
-    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
-    JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[0], exception));
-    ASSERT(!*exception);
-
-    bool autoCompletes = controller->elementDoesAutoCompleteForElementWithId(elementId.get());
-
-    return JSValueMakeBoolean(context, autoCompletes);
-}
-
 static JSValueRef waitForPolicyDelegateCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t, const JSValueRef[], JSValueRef*)
 {
     TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
@@ -2084,7 +2073,6 @@ JSStaticFunction* TestRunner::staticFunctions()
         { "dumpTitleChanges", dumpTitleChangesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "dumpIconChanges", dumpIconChangesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "dumpWillCacheResponse", dumpWillCacheResponseCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "elementDoesAutoCompleteForElementWithId", elementDoesAutoCompleteForElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "encodeHostName", encodeHostNameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "evaluateInWebInspector", evaluateInWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "evaluateScriptInIsolatedWorldAndReturnValue", evaluateScriptInIsolatedWorldAndReturnValueCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
index cca41f7..4f370c3 100644 (file)
@@ -135,8 +135,6 @@ public:
     void removeAllWebNotificationPermissions();
     void simulateWebNotificationClick(JSValueRef notification);
 
-    bool elementDoesAutoCompleteForElementWithId(JSStringRef id);
-
     bool dumpAsAudio() const { return m_dumpAsAudio; }
     void setDumpAsAudio(bool dumpAsAudio) { m_dumpAsAudio = dumpAsAudio; }
     
index aae8438..645ae79 100644 (file)
@@ -317,13 +317,6 @@ int TestRunner::windowCount()
     return 0;
 }
 
-bool TestRunner::elementDoesAutoCompleteForElementWithId(JSStringRef id)
-{
-    UNUSED_PARAM(id);
-    notImplemented();
-    return false;
-}
-
 void TestRunner::setWaitToDump(bool waitToDump)
 {
     // Change from 30s to 35s because some test cases in multipart need 30 seconds,
index 47951ef..2ad3430 100644 (file)
@@ -182,7 +182,6 @@ TestRunner::TestRunner(TestInterfaces* interfaces)
     bindMethod("setTabKeyCyclesThroughElements", &TestRunner::setTabKeyCyclesThroughElements);
     bindMethod("execCommand", &TestRunner::execCommand);
     bindMethod("isCommandEnabled", &TestRunner::isCommandEnabled);
-    bindMethod("elementDoesAutoCompleteForElementWithId", &TestRunner::elementDoesAutoCompleteForElementWithId);
     bindMethod("callShouldCloseOnWebView", &TestRunner::callShouldCloseOnWebView);
     bindMethod("setDomainRelaxationForbiddenForURLScheme", &TestRunner::setDomainRelaxationForbiddenForURLScheme);
     bindMethod("evaluateScriptInIsolatedWorldAndReturnValue", &TestRunner::evaluateScriptInIsolatedWorldAndReturnValue);
@@ -1143,30 +1142,6 @@ void TestRunner::isCommandEnabled(const CppArgumentList& arguments, CppVariant*
     result->set(rv);
 }
 
-bool TestRunner::elementDoesAutoCompleteForElementWithId(const WebString& elementId)
-{
-    WebFrame* webFrame = m_webView->mainFrame();
-    if (!webFrame)
-        return false;
-
-    WebElement element = webFrame->document().getElementById(elementId);
-    if (element.isNull() || !element.hasTagName("input"))
-        return false;
-
-    WebInputElement inputElement = element.to<WebInputElement>();
-    return inputElement.autoComplete();
-}
-
-void TestRunner::elementDoesAutoCompleteForElementWithId(const CppArgumentList& arguments, CppVariant* result)
-{
-    if (arguments.size() != 1 || !arguments[0].isString()) {
-        result->set(false);
-        return;
-    }
-    WebString elementId = cppVariantToWebString(arguments[0]);
-    result->set(elementDoesAutoCompleteForElementWithId(elementId));
-}
-
 void TestRunner::callShouldCloseOnWebView(const CppArgumentList&, CppVariant* result)
 {
     result->set(m_webView->dispatchBeforeUnloadEvent());
index 88d8b37..25e7fe8 100644 (file)
@@ -214,7 +214,6 @@ private:
     // Checks if an internal command is currently available.
     void isCommandEnabled(const CppArgumentList&, CppVariant*);
 
-    void elementDoesAutoCompleteForElementWithId(const CppArgumentList&, CppVariant*);
     void callShouldCloseOnWebView(const CppArgumentList&, CppVariant*);
     void setDomainRelaxationForbiddenForURLScheme(const CppArgumentList&, CppVariant*);
     void evaluateScriptInIsolatedWorldAndReturnValue(const CppArgumentList&, CppVariant*);
@@ -524,7 +523,6 @@ private:
     void didNotAcquirePointerLockInternal();
     void didLosePointerLockInternal();
 
-    bool elementDoesAutoCompleteForElementWithId(const WebKit::WebString&);
     bool cppVariantToBool(const CppVariant&);
     int32_t cppVariantToInt32(const CppVariant&);
     WebKit::WebString cppVariantToWebString(const CppVariant&);
index 88756dc..e65b5a2 100644 (file)
@@ -436,13 +436,6 @@ void TestRunner::setPluginsEnabled(bool flag)
     ewk_view_setting_enable_plugins_set(browser->mainView(), flag);
 }
 
-bool TestRunner::elementDoesAutoCompleteForElementWithId(JSStringRef id)
-{
-    const String elementId(id->string());
-    const Evas_Object* mainFrame = browser->mainFrame();
-    return DumpRenderTreeSupportEfl::elementDoesAutoCompleteForElementWithId(mainFrame, elementId);
-}
-
 void TestRunner::execCommand(JSStringRef name, JSStringRef value)
 {
     DumpRenderTreeSupportEfl::executeCoreCommandByName(browser->mainView(), name->string().utf8().data(), value->string().utf8().data());
index f1c3069..42ce672 100644 (file)
@@ -509,11 +509,6 @@ void TestRunner::setPluginsEnabled(bool flag)
     g_object_set(G_OBJECT(settings), "enable-plugins", flag, NULL);
 }
 
-bool TestRunner::elementDoesAutoCompleteForElementWithId(JSStringRef id) 
-{
-    return DumpRenderTreeSupportGtk::elementDoesAutoCompleteForElementWithId(mainFrame, id);
-}
-
 void TestRunner::execCommand(JSStringRef name, JSStringRef value)
 {
     WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
index dfb9a6e..b2326a2 100644 (file)
@@ -663,20 +663,6 @@ int TestRunner::windowCount()
     return CFArrayGetCount(openWindowsRef);
 }
 
-bool TestRunner::elementDoesAutoCompleteForElementWithId(JSStringRef jsString)
-{
-    RetainPtr<CFStringRef> idCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, jsString));
-    NSString *idNS = (NSString *)idCF.get();
-    
-    DOMElement *element = [[mainFrame DOMDocument] getElementById:idNS];
-    id rep = [[mainFrame dataSource] representation];
-    
-    if ([rep class] == [WebHTMLRepresentation class])
-        return [(WebHTMLRepresentation *)rep elementDoesAutoComplete:element];
-
-    return false;
-}
-
 void TestRunner::execCommand(JSStringRef name, JSStringRef value)
 {
     RetainPtr<CFStringRef> nameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, name));
index 60c53bb..e5e8243 100644 (file)
@@ -745,11 +745,6 @@ bool TestRunnerQt::findString(const QString& string, const QStringList& optionAr
     return DumpRenderTreeSupportQt::findString(m_drt->pageAdapter(), string, optionArray);
 }
 
-bool TestRunnerQt::elementDoesAutoCompleteForElementWithId(const QString& elementId)
-{
-    return DumpRenderTreeSupportQt::elementDoesAutoCompleteForElementWithId(m_drt->mainFrameAdapter(), elementId);
-}
-
 void TestRunnerQt::authenticateSession(const QString&, const QString&, const QString&)
 {
     // FIXME: If there is a concept per-session (per-process) credential storage, the credentials should be added to it for later use.
index dd026de..65bbb82 100644 (file)
@@ -184,8 +184,6 @@ public Q_SLOTS:
     bool isCommandEnabled(const QString& name) const;
     bool findString(const QString&, const QStringList& optionArray);
 
-    bool elementDoesAutoCompleteForElementWithId(const QString& elementId);
-
     void addOriginAccessWhitelistEntry(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains);
     void removeOriginAccessWhitelistEntry(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains);
 
index 842326c..6648c3e 100644 (file)
@@ -768,32 +768,6 @@ int TestRunner::windowCount()
     return openWindows().size();
 }
 
-bool TestRunner::elementDoesAutoCompleteForElementWithId(JSStringRef id)
-{
-    COMPtr<IDOMDocument> document;
-    if (FAILED(frame->DOMDocument(&document)))
-        return false;
-
-    wstring idWstring = jsStringRefToWString(id);
-    BSTR idBSTR = SysAllocStringLen((OLECHAR*)idWstring.c_str(), idWstring.length());
-    COMPtr<IDOMElement> element;
-    HRESULT result = document->getElementById(idBSTR, &element);
-    SysFreeString(idBSTR);
-
-    if (FAILED(result))
-        return false;
-
-    COMPtr<IWebFramePrivate> framePrivate(Query, frame);
-    if (!framePrivate)
-        return false;
-
-    BOOL autoCompletes;
-    if (FAILED(framePrivate->elementDoesAutoComplete(element.get(), &autoCompletes)))
-        return false;
-
-    return autoCompletes;
-}
-
 void TestRunner::execCommand(JSStringRef name, JSStringRef value)
 {
     wstring wName = jsStringRefToWString(name);
index 9775113..4753c29 100644 (file)
@@ -209,12 +209,6 @@ void TestRunner::setPluginsEnabled(bool flag)
     // FIXME: Implement
 }
 
-bool TestRunner::elementDoesAutoCompleteForElementWithId(JSStringRef id) 
-{
-    // FIXME: implement
-    return false;
-}
-
 void TestRunner::execCommand(JSStringRef name, JSStringRef value)
 {
     // FIXME: implement