Reorganize UIScriptController into platform-specific subclasses
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Jul 2019 02:10:56 +0000 (02:10 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Jul 2019 02:10:56 +0000 (02:10 +0000)
commit8bb1e4cdcbbf493e2ab131071bc2105844286e30
tree6ad004e9edaafd3369b80a3d328f1dfbd9bbd88d
parent2976f7d828cf166c06258f906e18d41da2fd0f5a
Reorganize UIScriptController into platform-specific subclasses
https://bugs.webkit.org/show_bug.cgi?id=200027

Reviewed by Simon Fraser.

Instead of a mishmash of #ifdefs and extraneous empty functions,
reorganize UIScriptController so that we have a base class
with functions that assert if called (to make it harder to
accidentally write a test that depends on unimplemented
functionality), and override them in platform specific subclasses
as functionality is added.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/ios/UIScriptControllerIOS.h: Added.
* DumpRenderTree/ios/UIScriptControllerIOS.mm:
* DumpRenderTree/mac/UIScriptControllerMac.h: Added.
* DumpRenderTree/mac/UIScriptControllerMac.mm:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: Added.
* WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: Added.
* WebKitTestRunner/gtk/UIScriptControllerGtk.cpp:
* WebKitTestRunner/gtk/UIScriptControllerGtk.h: Added.
* WebKitTestRunner/ios/UIScriptControllerIOS.h: Added.
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
* WebKitTestRunner/mac/UIScriptControllerMac.h: Added.
* WebKitTestRunner/mac/UIScriptControllerMac.mm:

* http/tests/contentdispositionattachmentsandbox/resources/referer-header-stripped.js:
(onload):
This test both uses event sender to click, and UIScriptController to "tap".
Since singleTapAtPoint is unimplemented on macOS, it really just ended
up doing nothing, but now it asserts. Only click or tap, but not both.

* platform/mac/TestExpectations:
* platform/win/TestExpectations:
Skip some tests for unimplemented or unsupported features.

* platform/mac/fast/events/autoscroll-when-input-is-offscreen-expected.txt: Removed.
* platform/mac/fast/events/autoscroll-with-software-keyboard-expected.txt: Removed.
Remove unneeded test results.

* swipe/resources/swipe-test.js:
(playEventStream):
playBackEventStream is unimplemented on iOS. Also, it's not necessary
for simulated swipe to send events at all on iOS, so just bail, which
is equivalent to what used to happen.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/contentdispositionattachmentsandbox/resources/referer-header-stripped.js
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/mac/fast/events/autoscroll-when-input-is-offscreen-expected.txt [deleted file]
LayoutTests/platform/mac/fast/events/autoscroll-with-software-keyboard-expected.txt [deleted file]
LayoutTests/platform/win/TestExpectations
LayoutTests/swipe/resources/swipe-test.js
Tools/ChangeLog
Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
Tools/DumpRenderTree/ios/UIScriptControllerIOS.h [new file with mode: 0644]
Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm
Tools/DumpRenderTree/mac/UIScriptControllerMac.h [new file with mode: 0644]
Tools/DumpRenderTree/mac/UIScriptControllerMac.mm
Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp
Tools/TestRunnerShared/UIScriptContext/UIScriptController.h
Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.h [new file with mode: 0644]
Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm [moved from Tools/WebKitTestRunner/UIScriptControllerCocoa.mm with 63% similarity]
Tools/WebKitTestRunner/gtk/UIScriptControllerGtk.cpp
Tools/WebKitTestRunner/gtk/UIScriptControllerGtk.h [new file with mode: 0644]
Tools/WebKitTestRunner/ios/UIScriptControllerIOS.h [new file with mode: 0644]
Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm
Tools/WebKitTestRunner/mac/UIScriptControllerMac.h [new file with mode: 0644]
Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm