haikuwebkit/Tools/TestRunnerShared
Sam Weinig 9cc977ee4d Allow testing of the final UIView tree on iOS platforms
https://bugs.webkit.org/show_bug.cgi?id=229016

Reviewed by Tim Horton.

Source/WebKit:

Test: remote-layer-tree/ios/uiview-tree-basic.html

* UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
* UIProcess/API/ios/WKWebViewTestingIOS.mm:
(allowListedClassToString):
(dumpUIView):
(-[WKWebView _uiViewTreeAsText]):
Add partner SPI called _uiViewTreeAsText that dumps the WKWebView's
UIView tree as constructed via remote layer creation. It currently
dumps some basic properties of each view and uses an allow list of
class names so changes to implementation details in frameworks below
us, like UIKit, don't cause tests to fail.

Tools:

* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::uiViewTreeAsText const):
* WebKitTestRunner/ios/UIScriptControllerIOS.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::uiViewTreeAsText const):
Pipe new _uiViewTreeAsText SPI through to UIScriptController, matching the pattern
established by scrollingTreeAsText.

LayoutTests:

* remote-layer-tree: Added.
* remote-layer-tree/ios: Added.
* remote-layer-tree/ios/uiview-tree-basic-expected.txt: Added.
* remote-layer-tree/ios/uiview-tree-basic.html: Added.
Add basic test case excercising UIView tree dumping to ensure
it is working properly.

* resources/ui-helper.js:
(window.UIHelper.getUIViewTree):
Add helper to use get the UIView tree as text.

* TestExpectations:
* platform/ios/TestExpectations:
Ensure these tests are only run on iOS.


Canonical link: https://commits.webkit.org/240481@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 20:16:51 +00:00
..
Bindings Remove <wtf/Optional.h> 2021-06-02 06:45:51 +00:00
EventSerialization/mac Reduce explicit usage of [objC autorelease] in WebKit even further 2021-02-18 05:06:15 +00:00
UIScriptContext Allow testing of the final UIView tree on iOS platforms 2021-08-12 20:16:51 +00:00
cocoa Use adoptNS() as soon as we [[ObjcClass alloc] init] to avoid leaks in Tools/ 2021-02-23 16:21:48 +00:00
config [CMake] Add a new library target TestRunnerShared 2020-09-17 02:05:47 +00:00
mac Use adoptNS() as soon as we [[ObjcClass alloc] init] to avoid leaks 2021-02-22 21:59:00 +00:00
spi Remove unused editable image code 2020-08-31 03:26:23 +00:00
CMakeLists.txt Share TestFeatures and TestCommand infrastructure between DumpRenderTree and WebKitTestRunner 2020-10-12 21:54:50 +00:00
IOSLayoutTestCommunication.cpp
IOSLayoutTestCommunication.h
ReftestFunctions.cpp Send TestRendered event after running a test but before dumping 2020-09-13 06:21:39 +00:00
ReftestFunctions.h Send TestRendered event after running a test but before dumping 2020-09-13 06:21:39 +00:00
TestCommand.cpp Use non-throwing std::filesystem API in TestRunner 2021-05-11 04:46:49 +00:00
TestCommand.h Share TestFeatures and TestCommand infrastructure between DumpRenderTree and WebKitTestRunner 2020-10-12 21:54:50 +00:00
TestFeatures.cpp Handle custom identifiers and strings separately, so we can quote strings correctly consistently 2021-06-07 02:39:33 +00:00
TestFeatures.h Remove support for experimental: and internal: prefixes from WebKitTestRunner and DumpRenderTree 2020-11-04 22:22:03 +00:00