WebKitTools:
authorweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Sep 2007 19:51:58 +0000 (19:51 +0000)
committerweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Sep 2007 19:51:58 +0000 (19:51 +0000)
commitaa61e1bd3704412a0284b2a3fdcaa22ce9389dc3
treef09bb86db09ed915af56f2ebae21f0868354c250
parent309621ecb8511819144ef9aed6b5d567cb2d6a06
WebKitTools:

        Rubber stamped by Darin.

        Convert the LayoutTestController to use the JSCore API instead of WebScriptObject.

        * DumpRenderTree/DumpRenderTree.h: Re-order variables.
        * DumpRenderTree/DumpRenderTree.m: Removed.
        * DumpRenderTree/DumpRenderTree.mm: Copied from DumpRenderTree/DumpRenderTree.m.
        (stopJavaScriptThreads): Fix initialization.
        (setDefaultColorProfileToRGB): Add explicit cast from void*.
        (dumpRenderTree): Ditto.
        (runTest):
        Used the WorkQueue from the windows DRT instead of the old NSMutableArray one.

        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
        * DumpRenderTree/FrameLoadDelegate.h: Add LayoutTestController instance variable.
        * DumpRenderTree/FrameLoadDelegate.m: Removed.
        * DumpRenderTree/FrameLoadDelegate.mm: Copied from DumpRenderTree/FrameLoadDelegate.m.
        (-[FrameLoadDelegate init]):
        (-[FrameLoadDelegate dealloc]):
        (-[FrameLoadDelegate processWork:]):
        (-[FrameLoadDelegate webView:locationChangeDone:forDataSource:]):
        (-[FrameLoadDelegate webView:didClearWindowObject:forFrame:]):
        Convert to use the new JSCore based LayoutTestController and the new WorkQueue.

        * DumpRenderTree/LayoutTestController.cpp: Added.
        (LayoutTestController::LayoutTestController):
        (LayoutTestController::~LayoutTestController):
        (dumpAsTextCallback):
        (dumpBackForwardListCallback):
        (dumpChildFramesAsTextCallback):
        (dumpChildFrameScrollPositionsCallback):
        (dumpDOMAsWebArchiveCallback):
        (dumpEditingCallbacksCallback):
        (dumpFrameLoadCallbacksCallback):
        (dumpResourceLoadCallbacksCallback):
        (dumpSelectionRectCallback):
        (dumpSourceAsWebArchiveCallback):
        (dumpTitleChangesCallback):
        (repaintSweepHorizontallyCallback):
        (setCallCloseOnWebViewsCallback):
        (setCanOpenWindowsCallback):
        (setCloseRemainingWindowsWhenCompleteCallback):
        (testRepaintCallback):
        (addFileToPasteboardOnDragCallback):
        (addDisallowedURLCallback):
        (clearBackForwardListCallback):
        (decodeHostNameCallback):
        (displayCallback):
        (encodeHostNameCallback):
        (keepWebHistoryCallback):
        (notifyDoneCallback):
        (queueBackNavigationCallback):
        (queueForwardNavigationCallback):
        (queueLoadCallback):
        (queueReloadCallback):
        (queueScriptCallback):
        (setAcceptsEditingCallback):
        (setCustomPolicyDelegateCallback):
        (setMainFrameIsFirstResponderCallback):
        (setTabKeyCyclesThroughElementsCallback):
        (setUseDashboardCompatibilityModeCallback):
        (setUserStyleSheetEnabledCallback):
        (setUserStyleSheetLocationCallback):
        (setWindowIsKeyCallback):
        (waitUntilDoneCallback):
        (windowCountCallback):
        (LayoutTestController::makeWindowObject):
        (LayoutTestController::getLayoutTestControllerJSClass):
        (LayoutTestController::staticFunctions):
        * DumpRenderTree/LayoutTestController.h: Replaced.
        * DumpRenderTree/LayoutTestController.m: Removed.
        * DumpRenderTree/LayoutTestControllerMac.mm: Added.
        (LayoutTestController::dumpAsText):
        (LayoutTestController::dumpBackForwardList):
        (LayoutTestController::dumpChildFramesAsText):
        (LayoutTestController::dumpChildFrameScrollPositions):
        (LayoutTestController::dumpDOMAsWebArchive):
        (LayoutTestController::dumpEditingCallbacks):
        (LayoutTestController::dumpFrameLoadCallbacks):
        (LayoutTestController::dumpResourceLoadCallbacks):
        (LayoutTestController::dumpSelectionRect):
        (LayoutTestController::dumpSourceAsWebArchive):
        (LayoutTestController::dumpTitleChanges):
        (LayoutTestController::repaintSweepHorizontally):
        (LayoutTestController::setCallCloseOnWebViews):
        (LayoutTestController::setCanOpenWindows):
        (LayoutTestController::setCloseRemainingWindowsWhenComplete):
        (LayoutTestController::testRepaint):
        (LayoutTestController::addFileToPasteboardOnDrag):
        (LayoutTestController::addDisallowedURL):
        (LayoutTestController::clearBackForwardList):
        (LayoutTestController::decodeHostName):
        (LayoutTestController::encodeHostName):
        (LayoutTestController::display):
        (LayoutTestController::keepWebHistory):
        (LayoutTestController::notifyDone):
        (LayoutTestController::queueBackNavigation):
        (LayoutTestController::queueForwardNavigation):
        (LayoutTestController::queueLoad):
        (LayoutTestController::queueReload):
        (LayoutTestController::queueScript):
        (LayoutTestController::setAcceptsEditing):
        (LayoutTestController::setCustomPolicyDelegate):
        (LayoutTestController::setMainFrameIsFirstResponder):
        (LayoutTestController::setTabKeyCyclesThroughElements):
        (LayoutTestController::setUseDashboardCompatibilityMode):
        (LayoutTestController::setUserStyleSheetEnabled):
        (LayoutTestController::setUserStyleSheetLocation):
        (LayoutTestController::setWindowIsKey):
        (+[WaitToDumpWatchdog waitUntilDoneWatchdogFired]):
        (LayoutTestController::waitUntilDone):
        (LayoutTestController::windowCount):
        Use the JSCore API to implement the LayoutTestController.

        * DumpRenderTree/ObjCController.h:
        * DumpRenderTree/ObjCController.m:
        (+[ObjCController isSelectorExcludedFromWebScript:]):
        (+[ObjCController webScriptNameForSelector:]):
        (-[ObjCController accessStoredWebScriptObject]):
        (-[ObjCController storeWebScriptObject:]):
        (-[ObjCController dealloc]):
        (-[ObjCController invokeUndefinedMethodFromWebScript:withArguments:]):
        Move WebScriptObject tests to ObjCController.

        * DumpRenderTree/UIDelegate.m: Removed.
        * DumpRenderTree/UIDelegate.mm: Copied from DumpRenderTree/UIDelegate.m.

        * DumpRenderTree/WorkQueue.cpp: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WorkQueue.cpp.
        * DumpRenderTree/WorkQueue.h: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WorkQueue.h.
        * DumpRenderTree/WorkQueueItem.h: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WorkQueueItem.h.
        (WorkQueueItem::~WorkQueueItem):
        (LoadItem::LoadItem):
        (LoadItem::url):
        (LoadItem::target):
        (ScriptItem::ScriptItem):
        (ScriptItem::script):
        * DumpRenderTree/WorkQueueItemMac.mm: Added.
        (LoadItem::invoke):
        (ReloadItem::invoke):
        (ScriptItem::invoke):
        (BackForwardItem::invoke):
        Copy WorkQueue and WorkQueueItem from windows DRT. Changed the WorkQueueItem to use JSStringRefs instead of wstrings
        to avoid conversion until the last possible moment.  These changes will be merged with the windows DRT when we start
        sharing code.

LayoutTests:

        Rubber stamped by Darin.

        Fix layout tests for new JSCore API based LayoutTestController.

        * fast/dom/resources/wrapper-identity-base.js: Use ObjCController for objective-c tests.
        * http/tests/local/file-url-sent-as-referer.html: Remove unused illegal call that now causes controller to fail due to not allowing undefined method calls.
        * http/tests/xmlhttprequest/default-content-type-dashboard.html: Fix typo in function name.
        * http/tests/xmlhttprequest/svg-created-by-xhr-disallowed-in-dashboard.html: Fix typo in function name.
        * plugins/call-as-function-test-expected.txt:
        * plugins/call-as-function-test.html: Use ObjCController to test WebScriptObject.
        * plugins/root-object-premature-delete-crash.html: Use ObjCController to test WebScriptObject
        * plugins/undefined-property-crash.html: Use ObjCController to test WebScriptObject.
        * svg/custom/embedded-svg-disallowed-in-dashboard.xml: Fix typo in function name.
        * svg/custom/manually-parsed-embedded-svg-disallowed-in-dashboard.html: Fix typo in function name.
        * svg/custom/manually-parsed-svg-disallowed-in-dashboard.html: Fix typo in function name.
        * svg/custom/svg-disallowed-in-dashboard-object.html: Fix typo in function name.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
30 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/resources/wrapper-identity-base.js
LayoutTests/http/tests/local/file-url-sent-as-referer.html
LayoutTests/http/tests/xmlhttprequest/default-content-type-dashboard.html
LayoutTests/http/tests/xmlhttprequest/svg-created-by-xhr-disallowed-in-dashboard.html
LayoutTests/plugins/call-as-function-test-expected.txt
LayoutTests/plugins/call-as-function-test.html
LayoutTests/plugins/root-object-premature-delete-crash.html
LayoutTests/plugins/undefined-property-crash.html
LayoutTests/svg/custom/embedded-svg-disallowed-in-dashboard.xml
LayoutTests/svg/custom/manually-parsed-embedded-svg-disallowed-in-dashboard.html
LayoutTests/svg/custom/manually-parsed-svg-disallowed-in-dashboard.html
LayoutTests/svg/custom/svg-disallowed-in-dashboard-object.html
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/DumpRenderTree.h
WebKitTools/DumpRenderTree/DumpRenderTree.mm [moved from WebKitTools/DumpRenderTree/DumpRenderTree.m with 98% similarity]
WebKitTools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
WebKitTools/DumpRenderTree/FrameLoadDelegate.h
WebKitTools/DumpRenderTree/FrameLoadDelegate.mm [moved from WebKitTools/DumpRenderTree/FrameLoadDelegate.m with 93% similarity]
WebKitTools/DumpRenderTree/LayoutTestController.cpp [new file with mode: 0644]
WebKitTools/DumpRenderTree/LayoutTestController.h
WebKitTools/DumpRenderTree/LayoutTestController.m [deleted file]
WebKitTools/DumpRenderTree/LayoutTestControllerMac.mm [new file with mode: 0644]
WebKitTools/DumpRenderTree/ObjCController.h
WebKitTools/DumpRenderTree/ObjCController.m
WebKitTools/DumpRenderTree/UIDelegate.mm [moved from WebKitTools/DumpRenderTree/UIDelegate.m with 100% similarity]
WebKitTools/DumpRenderTree/WorkQueue.cpp [new file with mode: 0644]
WebKitTools/DumpRenderTree/WorkQueue.h [new file with mode: 0644]
WebKitTools/DumpRenderTree/WorkQueueItem.h [new file with mode: 0644]
WebKitTools/DumpRenderTree/WorkQueueItemMac.mm [new file with mode: 0644]