Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: bef4c7f2d0b60199d448ed763bc2edc554c55594
https://github.com/WebKit/WebKit/commit/bef4c7f2d0b60199d448ed763bc2edc554c55594
Author: Abrar Rahman Protyasha <[email protected]>
Date: 2023-05-15 (Mon, 15 May 2023)
Changed paths:
M Tools/TestWebKitAPI/SourcesCocoa.txt
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm
M Tools/TestWebKitAPI/cocoa/DragAndDropSimulator.h
A Tools/TestWebKitAPI/cocoa/DragAndDropSimulator.mm
M Tools/TestWebKitAPI/cocoa/TestWKWebView.h
M Tools/TestWebKitAPI/cocoa/TestWKWebView.mm
Log Message:
-----------
[ iOS simulator ] 2X
TestWebKitAPI.DragAndDropTests.ExternalSourceDataTransferItemGet (API-Tests)
are constant timeouts
https://bugs.webkit.org/show_bug.cgi?id=256746
rdar://109222780
Reviewed by Wenson Hsieh.
The API tests
TestWebKitAPI.DragAndDropTests.ExternalSourceDataTransferItemGet[Folder,PlainTextFile]AsEntry
consistently time out when running on an iOS simulator simulating iPhone
12. These timeouts have surfaced recently given we bumped the default
iPhone simulator to iPhone 12 in 256495@main. When running on iPhone 12,
the change in screen resolution meant that some of our hardcoded drag
gestures became out-of-place, causing unwarranted behavior and leading
to the timeouts.
This commit hardens the test cases against similar changes in the future
by introducing a way to start a drag over an element in the DOM and
ending it at another element in the DOM. Doing so required imbibing
`TestWKWebView` with a `getElementMidpoint` method, which takes the
selector for a DOM element and returns its midpoint, and
`DragAndDropSimulator` with a `runFromElement:toElement:` method, which
is similar in spirit to the `runFrom:to:` except the drag source and
destination are now specified as DOM element selectors, rather than
locations.
* Tools/TestWebKitAPI/SourcesCocoa.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
(TestWebKitAPI::TEST):
* Tools/TestWebKitAPI/cocoa/DragAndDropSimulator.h:
* Tools/TestWebKitAPI/cocoa/DragAndDropSimulator.mm: Added.
(-[DragAndDropSimulator runFromElement:toElement:]):
* Tools/TestWebKitAPI/cocoa/TestWKWebView.h:
* Tools/TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView getElementMidpoint:]):
Signed-off-by: Abrar Rahman Protyasha <[email protected]>
Canonical link: https://commits.webkit.org/264080@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes