Title: [294547] trunk/Tools/WebKitTestRunner
- Revision
- 294547
- Author
- tyle...@apple.com
- Date
- 2022-05-20 10:00:34 -0700 (Fri, 20 May 2022)
Log Message
After commit 039ebd9, some tests run with ITM disabled despite --accessibility-isolated-tree flag being passed
https://bugs.webkit.org/show_bug.cgi?id=240627
Reviewed by Chris Fleizach.
https://github.com/WebKit/WebKit/commit/039ebd9 changed TestController::resetStateToConsistentValues to only send the "Reset" message to the testing InjectedBundle after a test completed, rather than before and after each test. This is a good and logical change, but exposed a bug in how we set InjectedBundle::m_accessibilityIsolatedTree, since we relied on this "Reset" behavior to setup this member variable.
With this patch, we instead set InjectedBundle::m_accessibilityIsolatedTree in response to the "BeginTest" message, which fixes the issue.
* Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* Tools/WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
* Tools/WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::createTestSettingsDictionary):
Canonical link: https://commits.webkit.org/250802@main
Modified Paths
Diff
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (294546 => 294547)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp 2022-05-20 16:35:53 UTC (rev 294546)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp 2022-05-20 17:00:34 UTC (rev 294547)
@@ -192,6 +192,9 @@
if (WKStringIsEqualToUTF8CString(messageName, "BeginTest")) {
ASSERT(messageBody);
auto messageBodyDictionary = dictionaryValue(messageBody);
+#if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
+ m_accessibilityIsolatedTreeMode = booleanValue(messageBodyDictionary, "IsAccessibilityIsolatedTreeEnabled");
+#endif
WKBundlePagePostMessage(page, toWK("Ack").get(), toWK("BeginTest").get());
beginTesting(messageBodyDictionary, BegingTestingMode::New);
return;
@@ -205,10 +208,6 @@
if (booleanValue(messageBodyDictionary, "ShouldGC"))
WKBundleGarbageCollectJavaScriptObjects(m_bundle.get());
-#if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
- m_accessibilityIsolatedTreeMode = booleanValue(messageBodyDictionary, "AccessibilityIsolatedTree");
-#endif
-
auto allowedHostsValue = value(messageBodyDictionary, "AllowedHosts");
if (allowedHostsValue && WKGetTypeID(allowedHostsValue) == WKArrayGetTypeID()) {
m_allowedHosts.clear();
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (294546 => 294547)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2022-05-20 16:35:53 UTC (rev 294546)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2022-05-20 17:00:34 UTC (rev 294547)
@@ -1020,10 +1020,6 @@
WKArrayAppendItem(allowedHostsValue.get(), toWK(host.c_str()).get());
setValue(resetMessageBody, "AllowedHosts", allowedHostsValue);
-#if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
- setValue(resetMessageBody, "AccessibilityIsolatedTree", options.accessibilityIsolatedTreeMode());
-#endif
-
auto jscOptions = options.jscOptions();
if (!jscOptions.empty())
setValue(resetMessageBody, "JSCOptions", jscOptions.c_str());
Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (294546 => 294547)
--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2022-05-20 16:35:53 UTC (rev 294546)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2022-05-20 17:00:34 UTC (rev 294547)
@@ -133,6 +133,9 @@
WKRetainPtr<WKMutableDictionaryRef> TestInvocation::createTestSettingsDictionary()
{
auto beginTestMessageBody = adoptWK(WKMutableDictionaryCreate());
+#if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
+ setValue(beginTestMessageBody, "IsAccessibilityIsolatedTreeEnabled", options().accessibilityIsolatedTreeMode());
+#endif
setValue(beginTestMessageBody, "UseFlexibleViewport", options().useFlexibleViewport());
setValue(beginTestMessageBody, "DumpPixels", m_dumpPixels);
setValue(beginTestMessageBody, "Timeout", static_cast<uint64_t>(m_timeout.milliseconds()));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes