Title: [134967] trunk/Tools
Revision
134967
Author
joc...@chromium.org
Date
2012-11-16 10:30:47 -0800 (Fri, 16 Nov 2012)

Log Message

[chromium] delete unused testRunner methods
https://bugs.webkit.org/show_bug.cgi?id=102479

Reviewed by Adam Barth.

These methods aren't used by any layout test. Remove them to avoid bit rot

* DumpRenderTree/chromium/DRTTestRunner.cpp:
(DRTTestRunner::DRTTestRunner):
(DRTTestRunner::reset):
* DumpRenderTree/chromium/DRTTestRunner.h:
(DRTTestRunner):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::shouldBeginEditing):
(WebViewHost::shouldEndEditing):
(WebViewHost::shouldInsertNode):
(WebViewHost::shouldInsertText):
(WebViewHost::shouldChangeSelectedRange):
(WebViewHost::shouldDeleteRange):
(WebViewHost::shouldApplyStyle):
(WebViewHost::startDragging):
(WebViewHost::enterFullScreenNow):
(WebViewHost::exitFullScreenNow):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (134966 => 134967)


--- trunk/Tools/ChangeLog	2012-11-16 18:19:04 UTC (rev 134966)
+++ trunk/Tools/ChangeLog	2012-11-16 18:30:47 UTC (rev 134967)
@@ -1,3 +1,29 @@
+2012-11-16  Jochen Eisinger  <joc...@chromium.org>
+
+        [chromium] delete unused testRunner methods
+        https://bugs.webkit.org/show_bug.cgi?id=102479
+
+        Reviewed by Adam Barth.
+
+        These methods aren't used by any layout test. Remove them to avoid bit rot
+
+        * DumpRenderTree/chromium/DRTTestRunner.cpp:
+        (DRTTestRunner::DRTTestRunner):
+        (DRTTestRunner::reset):
+        * DumpRenderTree/chromium/DRTTestRunner.h:
+        (DRTTestRunner):
+        * DumpRenderTree/chromium/WebViewHost.cpp:
+        (WebViewHost::shouldBeginEditing):
+        (WebViewHost::shouldEndEditing):
+        (WebViewHost::shouldInsertNode):
+        (WebViewHost::shouldInsertText):
+        (WebViewHost::shouldChangeSelectedRange):
+        (WebViewHost::shouldDeleteRange):
+        (WebViewHost::shouldApplyStyle):
+        (WebViewHost::startDragging):
+        (WebViewHost::enterFullScreenNow):
+        (WebViewHost::exitFullScreenNow):
+
 2012-11-15  Alexey Proskuryakov  <a...@apple.com>
 
         Private Browsing is a per-page setting that sets a global value

Modified: trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp (134966 => 134967)


--- trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp	2012-11-16 18:19:04 UTC (rev 134966)
+++ trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp	2012-11-16 18:30:47 UTC (rev 134967)
@@ -111,7 +111,6 @@
     // they will use when called by _javascript_. The actual binding of those
     // names to their methods will be done by calling bindToJavaScript() (defined
     // by CppBoundClass, the parent to DRTTestRunner).
-    bindMethod("addFileToPasteboardOnDrag", &DRTTestRunner::addFileToPasteboardOnDrag);
 #if ENABLE(INPUT_SPEECH)
     bindMethod("addMockSpeechInputResult", &DRTTestRunner::addMockSpeechInputResult);
     bindMethod("setMockSpeechInputDumpRect", &DRTTestRunner::setMockSpeechInputDumpRect);
@@ -132,7 +131,6 @@
     bindMethod("didNotAcquirePointerLock", &DRTTestRunner::didNotAcquirePointerLock);
 #endif
     bindMethod("disableAutoResizeMode", &DRTTestRunner::disableAutoResizeMode);
-    bindMethod("disableImageLoading", &DRTTestRunner::disableImageLoading);
     bindMethod("display", &DRTTestRunner::display);
     bindMethod("displayInvalidatedRegion", &DRTTestRunner::displayInvalidatedRegion);
     bindMethod("dumpAsText", &DRTTestRunner::dumpAsText);
@@ -174,7 +172,6 @@
     bindMethod("notifyDone", &DRTTestRunner::notifyDone);
     bindMethod("numberOfActiveAnimations", &DRTTestRunner::numberOfActiveAnimations);
     bindMethod("numberOfPendingGeolocationPermissionRequests", &DRTTestRunner:: numberOfPendingGeolocationPermissionRequests);
-    bindMethod("objCIdentityIsEqual", &DRTTestRunner::objCIdentityIsEqual);
     bindMethod("overridePreference", &DRTTestRunner::overridePreference);
     bindMethod("pathToLocalResource", &DRTTestRunner::pathToLocalResource);
     bindMethod("pauseAnimationAtTimeOnElementWithId", &DRTTestRunner::pauseAnimationAtTimeOnElementWithId);
@@ -189,7 +186,6 @@
     bindMethod("removeOriginAccessWhitelistEntry", &DRTTestRunner::removeOriginAccessWhitelistEntry);
     bindMethod("repaintSweepHorizontally", &DRTTestRunner::repaintSweepHorizontally);
     bindMethod("resetPageVisibility", &DRTTestRunner::resetPageVisibility);
-    bindMethod("setAcceptsEditing", &DRTTestRunner::setAcceptsEditing);
     bindMethod("setAllowDisplayOfInsecureContent", &DRTTestRunner::setAllowDisplayOfInsecureContent);
     bindMethod("setAllowFileAccessFromFileURLs", &DRTTestRunner::setAllowFileAccessFromFileURLs);
     bindMethod("setAllowRunningOfInsecureContent", &DRTTestRunner::setAllowRunningOfInsecureContent);
@@ -253,22 +249,18 @@
 
     // The following are stubs.
     bindMethod("abortModal", &DRTTestRunner::abortModal);
-    bindMethod("accessStoredWebScriptObject", &DRTTestRunner::accessStoredWebScriptObject);
     bindMethod("addDisallowedURL", &DRTTestRunner::addDisallowedURL);
     bindMethod("applicationCacheDiskUsageForOrigin", &DRTTestRunner::applicationCacheDiskUsageForOrigin);
     bindMethod("callShouldCloseOnWebView", &DRTTestRunner::callShouldCloseOnWebView);
     bindMethod("clearAllApplicationCaches", &DRTTestRunner::clearAllApplicationCaches);
     bindMethod("clearApplicationCacheForOrigin", &DRTTestRunner::clearApplicationCacheForOrigin);
     bindMethod("clearBackForwardList", &DRTTestRunner::clearBackForwardList);
-    bindMethod("dumpAsWebArchive", &DRTTestRunner::dumpAsWebArchive);
     bindMethod("keepWebHistory", &DRTTestRunner::keepWebHistory);
-    bindMethod("objCClassNameOf", &DRTTestRunner::objCClassNameOf);
     bindMethod("setApplicationCacheOriginQuota", &DRTTestRunner::setApplicationCacheOriginQuota);
     bindMethod("setCallCloseOnWebViews", &DRTTestRunner::setCallCloseOnWebViews);
     bindMethod("setMainFrameIsFirstResponder", &DRTTestRunner::setMainFrameIsFirstResponder);
     bindMethod("setPrivateBrowsingEnabled", &DRTTestRunner::setPrivateBrowsingEnabled);
     bindMethod("setUseDashboardCompatibilityMode", &DRTTestRunner::setUseDashboardCompatibilityMode);
-    bindMethod("storeWebScriptObject", &DRTTestRunner::storeWebScriptObject);
     bindMethod("deleteAllLocalStorage", &DRTTestRunner::deleteAllLocalStorage);
     bindMethod("localStorageDiskUsageForOrigin", &DRTTestRunner::localStorageDiskUsageForOrigin);
     bindMethod("originsWithLocalStorage", &DRTTestRunner::originsWithLocalStorage);
@@ -279,7 +271,6 @@
     bindMethod("enableFixedLayoutMode", &DRTTestRunner::enableFixedLayoutMode);
     bindMethod("setFixedLayoutSize", &DRTTestRunner::setFixedLayoutSize);
     bindMethod("selectionAsMarkup", &DRTTestRunner::selectionAsMarkup);
-    bindMethod("setHasCustomFullScreenBehavior", &DRTTestRunner::setHasCustomFullScreenBehavior);
     bindMethod("textSurroundingNode", &DRTTestRunner::textSurroundingNode);
 
     // The fallback method is called when an unknown method is invoked.
@@ -447,13 +438,6 @@
     result->setNull();
 }
 
-void DRTTestRunner::setAcceptsEditing(const CppArgumentList& arguments, CppVariant* result)
-{
-    if (arguments.size() > 0 && arguments[0].isBool())
-        m_acceptsEditing = arguments[0].value.boolValue;
-    result->setNull();
-}
-
 void DRTTestRunner::waitUntilDone(const CppArgumentList&, CppVariant* result)
 {
     if (!webkit_support::BeingDebugged())
@@ -633,16 +617,6 @@
     result->setNull();
 }
 
-void DRTTestRunner::objCIdentityIsEqual(const CppArgumentList& arguments, CppVariant* result)
-{
-    if (arguments.size() < 2) {
-        // This is the best we can do to return an error.
-        result->setNull();
-        return;
-    }
-    result->set(arguments[0].isEqual(arguments[1]));
-}
-
 void DRTTestRunner::reset()
 {
     if (m_shell) {
@@ -675,12 +649,10 @@
     m_dumpTitleChanges = false;
     m_dumpPermissionClientCallbacks = false;
     m_generatePixelResults = true;
-    m_acceptsEditing = true;
     m_waitUntilDone = false;
     m_canOpenWindows = false;
     m_testRepaint = false;
     m_sweepHorizontally = false;
-    m_shouldAddFileToPasteboard = false;
     m_stopProvisionalFrameLoads = false;
     m_deferMainResourceDataLoad = true;
     m_globalFlag.set(false);
@@ -706,7 +678,6 @@
     m_workQueue.reset();
     m_taskList.revokeAll();
     m_shouldStayOnPageAfterHandlingBeforeUnload = false;
-    m_hasCustomFullScreenBehavior = false;
 #if OS(LINUX) || OS(ANDROID)
     WebFontRendering::setSubpixelPositioning(false);
 #endif
@@ -1008,12 +979,6 @@
     result->set(webkit_support::RewriteLayoutTestsURL(url).spec());
 }
 
-void DRTTestRunner::addFileToPasteboardOnDrag(const CppArgumentList&, CppVariant* result)
-{
-    result->setNull();
-    m_shouldAddFileToPasteboard = true;
-}
-
 void DRTTestRunner::setStopProvisionalFrameLoads(const CppArgumentList&, CppVariant* result)
 {
     result->setNull();
@@ -1164,13 +1129,6 @@
     result->set(numberOfActiveAnimations());
 }
 
-void DRTTestRunner::disableImageLoading(const CppArgumentList&, CppVariant* result)
-{
-    m_shell->preferences()->loadsImagesAutomatically = false;
-    m_shell->applyPreferences();
-    result->setNull();
-}
-
 void DRTTestRunner::setIconDatabaseEnabled(const CppArgumentList&, CppVariant* result)
 {
     // We don't use the WebKit icon database.
@@ -1245,11 +1203,6 @@
 // Unimplemented stubs
 //
 
-void DRTTestRunner::dumpAsWebArchive(const CppArgumentList& arguments, CppVariant* result)
-{
-    result->setNull();
-}
-
 void DRTTestRunner::setMainFrameIsFirstResponder(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
@@ -1302,21 +1255,6 @@
     result->setNull();
 }
 
-void DRTTestRunner::storeWebScriptObject(const CppArgumentList& arguments, CppVariant* result)
-{
-    result->setNull();
-}
-
-void DRTTestRunner::accessStoredWebScriptObject(const CppArgumentList& arguments, CppVariant* result)
-{
-    result->setNull();
-}
-
-void DRTTestRunner::objCClassNameOf(const CppArgumentList& arguments, CppVariant* result)
-{
-    result->setNull();
-}
-
 void DRTTestRunner::addDisallowedURL(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
@@ -2237,14 +2175,6 @@
     setShouldDumpAsAudio(true);
 }
 
-void DRTTestRunner::setHasCustomFullScreenBehavior(const CppArgumentList& arguments, CppVariant* result)
-{
-    result->setNull();
-    if (arguments.size() <  1 || !arguments[0].isBool())
-        return;
-    m_hasCustomFullScreenBehavior = arguments[0].toBoolean();
-}
-
 #if ENABLE(POINTER_LOCK)
 void DRTTestRunner::didAcquirePointerLock(const CppArgumentList&, CppVariant* result)
 {

Modified: trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.h (134966 => 134967)


--- trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.h	2012-11-16 18:19:04 UTC (rev 134966)
+++ trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.h	2012-11-16 18:30:47 UTC (rev 134967)
@@ -139,11 +139,6 @@
     // It takes no arguments, and ignores any that may be present.
     void dumpCreateView(const CppArgumentList&, CppVariant*);
 
-    // When called with a boolean argument, this sets a flag that controls
-    // whether content-editable elements accept editing focus when an editing
-    // attempt is made. It ignores any additional arguments.
-    void setAcceptsEditing(const CppArgumentList&, CppVariant*);
-
     // Functions for dealing with windows. By default we block all new windows.
     void windowCount(const CppArgumentList&, CppVariant*);
     void setCanOpenWindows(const CppArgumentList&, CppVariant*);
@@ -164,10 +159,6 @@
     void queueLoad(const CppArgumentList&, CppVariant*);
     void queueLoadHTMLString(const CppArgumentList&, CppVariant*);
 
-    // Although this is named "objC" to match the Mac version, it actually tests
-    // the identity of its two arguments in C++.
-    void objCIdentityIsEqual(const CppArgumentList&, CppVariant*);
-
     // Changes the cookie policy from the default to allow all cookies.
     void setAlwaysAcceptCookies(const CppArgumentList&, CppVariant*);
 
@@ -220,10 +211,6 @@
     // Converts a URL starting with file:///tmp/ to the local mapping.
     void pathToLocalResource(const CppArgumentList&, CppVariant*);
 
-    // Sets a bool such that when a drag is started, we fill the drag clipboard
-    // with a fake file object.
-    void addFileToPasteboardOnDrag(const CppArgumentList&, CppVariant*);
-
     // Executes an internal command (superset of document.execCommand() commands).
     void execCommand(const CppArgumentList&, CppVariant*);
 
@@ -249,7 +236,6 @@
     void enableAutoResizeMode(const CppArgumentList&, CppVariant*);
     void disableAutoResizeMode(const CppArgumentList&, CppVariant*);
     void numberOfActiveAnimations(const CppArgumentList&, CppVariant*);
-    void disableImageLoading(const CppArgumentList&, CppVariant*);
     void setIconDatabaseEnabled(const CppArgumentList&, CppVariant*);
     void dumpSelectionRect(const CppArgumentList&, CppVariant*);
 
@@ -272,7 +258,6 @@
 
     // The following are only stubs.
     // FIXME: Implement any of these that are needed to pass the layout tests.
-    void dumpAsWebArchive(const CppArgumentList&, CppVariant*);
     void dumpTitleChanges(const CppArgumentList&, CppVariant*);
     void setMainFrameIsFirstResponder(const CppArgumentList&, CppVariant*);
     void display(const CppArgumentList&, CppVariant*);
@@ -281,9 +266,6 @@
     void repaintSweepHorizontally(const CppArgumentList&, CppVariant*);
     void clearBackForwardList(const CppArgumentList&, CppVariant*);
     void keepWebHistory(const CppArgumentList&, CppVariant*);
-    void storeWebScriptObject(const CppArgumentList&, CppVariant*);
-    void accessStoredWebScriptObject(const CppArgumentList&, CppVariant*);
-    void objCClassNameOf(const CppArgumentList&, CppVariant*);
     void addDisallowedURL(const CppArgumentList&, CppVariant*);
     void callShouldCloseOnWebView(const CppArgumentList&, CppVariant*);
     void setCallCloseOnWebViews(const CppArgumentList&, CppVariant*);
@@ -487,9 +469,7 @@
     bool shouldGeneratePixelResults() { return m_generatePixelResults; }
     void setShouldGeneratePixelResults(bool value) { m_generatePixelResults = value; }
     bool shouldDumpCreateView() { return m_dumpCreateView; }
-    bool acceptsEditing() { return m_acceptsEditing; }
     bool canOpenWindows() { return m_canOpenWindows; }
-    bool shouldAddFileToPasteboard() { return m_shouldAddFileToPasteboard; }
     bool stopProvisionalFrameLoads() { return m_stopProvisionalFrameLoads; }
     bool deferMainResourceDataLoad() { return m_deferMainResourceDataLoad; }
     void setShowDebugLayerTree(bool value) { m_showDebugLayerTree = value; }
@@ -509,9 +489,6 @@
     bool testRepaint() const { return m_testRepaint; }
     bool sweepHorizontally() const { return m_sweepHorizontally; }
 
-    void setHasCustomFullScreenBehavior(const CppArgumentList&, CppVariant*);
-    bool hasCustomFullScreenBehavior() const { return m_hasCustomFullScreenBehavior; }
-
     // Called by the webview delegate when the toplevel frame load is done.
     void locationChangeDone();
 
@@ -661,11 +638,6 @@
     // is invoked.
     bool m_dumpCreateView;
 
-    // If true, the element will be treated as editable. This value is returned
-    // from various editing callbacks that are called just before edit operations
-    // are allowed.
-    bool m_acceptsEditing;
-
     // If true, new windows can be opened via _javascript_ or by plugins. By
     // default, set to false and can be toggled to true using
     // setCanOpenWindows().
@@ -683,9 +655,6 @@
     // a series of 1px-wide, view-tall paints across the width of the view.
     bool m_sweepHorizontally;
 
-    // If true and a drag starts, adds a file to the drag&drop clipboard.
-    bool m_shouldAddFileToPasteboard;
-
     // If true, stops provisional frame loads during the
     // DidStartProvisionalLoadForFrame callback.
     bool m_stopProvisionalFrameLoads;
@@ -727,10 +696,6 @@
     OwnPtr<WebKit::WebDeliveredIntentClient> m_intentClient;
 
     bool m_shouldStayOnPageAfterHandlingBeforeUnload;
-
-    // If true, calls to WebViewHost::enter/exitFullScreenNow will not result in 
-    // calls to Document::will/did/Enter/ExitFullScreen.
-    bool m_hasCustomFullScreenBehavior;
 };
 
 #endif // DRTTestRunner_h

Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp (134966 => 134967)


--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp	2012-11-16 18:19:04 UTC (rev 134966)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp	2012-11-16 18:30:47 UTC (rev 134967)
@@ -146,16 +146,6 @@
     return url.substr(pos + 1);
 }
 
-// Adds a file called "DRTFakeFile" to dragData (CF_HDROP). Use to fake
-// dragging a file.
-static void addDRTFakeFileToDataObject(WebDragData* dragData)
-{
-    WebDragData::Item item;
-    item.storageType = WebDragData::Item::StorageTypeFilename;
-    item.filenameData = WebString::fromUTF8("DRTFakeFile");
-    dragData->addItem(item);
-}
-
 // Get a debugging string from a WebNavigationType.
 static const char* webNavigationTypeToString(WebNavigationType type)
 {
@@ -343,7 +333,7 @@
         printRangeDescription(range);
         fputs("\n", stdout);
     }
-    return testRunner()->acceptsEditing();
+    return true;
 }
 
 bool WebViewHost::shouldEndEditing(const WebRange& range)
@@ -353,7 +343,7 @@
         printRangeDescription(range);
         fputs("\n", stdout);
     }
-    return testRunner()->acceptsEditing();
+    return true;
 }
 
 bool WebViewHost::shouldInsertNode(const WebNode& node, const WebRange& range, WebEditingAction action)
@@ -365,7 +355,7 @@
         printRangeDescription(range);
         printf(" givenAction:%s\n", editingActionDescription(action).c_str());
     }
-    return testRunner()->acceptsEditing();
+    return true;
 }
 
 bool WebViewHost::shouldInsertText(const WebString& text, const WebRange& range, WebEditingAction action)
@@ -375,7 +365,7 @@
         printRangeDescription(range);
         printf(" givenAction:%s\n", editingActionDescription(action).c_str());
     }
-    return testRunner()->acceptsEditing();
+    return true;
 }
 
 bool WebViewHost::shouldChangeSelectedRange(
@@ -390,7 +380,7 @@
                textAffinityDescription(affinity).c_str(),
                (stillSelecting ? "TRUE" : "FALSE"));
     }
-    return testRunner()->acceptsEditing();
+    return true;
 }
 
 bool WebViewHost::shouldDeleteRange(const WebRange& range)
@@ -400,7 +390,7 @@
         printRangeDescription(range);
         fputs("\n", stdout);
     }
-    return testRunner()->acceptsEditing();
+    return true;
 }
 
 bool WebViewHost::shouldApplyStyle(const WebString& style, const WebRange& range)
@@ -410,7 +400,7 @@
         printRangeDescription(range);
         fputs("\n", stdout);
     }
-    return testRunner()->acceptsEditing();
+    return true;
 }
 
 bool WebViewHost::isSmartInsertDeleteEnabled()
@@ -589,15 +579,9 @@
 
 void WebViewHost::startDragging(WebFrame*, const WebDragData& data, WebDragOperationsMask mask, const WebImage&, const WebPoint&)
 {
-    WebDragData mutableDragData = data;
-    if (testRunner()->shouldAddFileToPasteboard()) {
-        // Add a file called DRTFakeFile to the drag&drop clipboard.
-        addDRTFakeFileToDataObject(&mutableDragData);
-    }
-
     // When running a test, we need to fake a drag drop operation otherwise
     // Windows waits for real mouse events to know when the drag is over.
-    m_shell->eventSender()->doDragDrop(mutableDragData, mask);
+    m_shell->eventSender()->doDragDrop(data, mask);
 }
 
 void WebViewHost::didUpdateLayout()
@@ -1743,18 +1727,12 @@
 
 void WebViewHost::enterFullScreenNow()
 {
-    if (testRunner()->hasCustomFullScreenBehavior())
-        return;
-
     webView()->willEnterFullScreen();
     webView()->didEnterFullScreen();
 }
 
 void WebViewHost::exitFullScreenNow()
 {
-    if (testRunner()->hasCustomFullScreenBehavior())
-        return;
-
     webView()->willExitFullScreen();
     webView()->didExitFullScreen();
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to