Title: [295347] trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm
Revision
295347
Author
wenson_hs...@apple.com
Date
2022-06-07 08:37:35 -0700 (Tue, 07 Jun 2022)

Log Message

Unreviewed, fix several failing API tests on iOS 15 after r295346
https://bugs.webkit.org/show_bug.cgi?id=241341
rdar://94446831

Rename a couple of strings that I missed in the original upstreaming patch. These tests ran normally
for me on iOS 16 simulator, since these system feature flags were enabled by default; however, iOS
15 relies on these feature flags being enabled for the web view through preferences.

* Tools/TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm:
(-[TestWKWebView waitForImageAnalysisRequests:]):

Also, drive-by-fix a minor grammar error in a logging string.

(TestWebKitAPI::createWebViewWithTextRecognitionEnhancements):

Canonical link: https://commits.webkit.org/251362@main

Modified Paths

Diff

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm (295346 => 295347)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm	2022-06-07 15:19:30 UTC (rev 295346)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm	2022-06-07 15:37:35 UTC (rev 295347)
@@ -78,7 +78,7 @@
 {
     TestWebKitAPI::Util::waitForConditionWithLogging([&] {
         return gDidProcessRequestCount == numberOfRequests;
-    }, 3, @"Timed out waiting for %u image analysis to complete.", numberOfRequests);
+    }, 3, @"Timed out waiting for %u image analysis requests to complete.", numberOfRequests);
 
     [self waitForNextPresentationUpdate];
     EXPECT_EQ(gDidProcessRequestCount, numberOfRequests);
@@ -154,7 +154,7 @@
     RetainPtr configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"WebProcessPlugInWithInternals" configureJSCForTesting:YES];
     for (_WKInternalDebugFeature *feature in WKPreferences._internalDebugFeatures) {
         NSString *key = feature.key;
-        if ([key isEqualToString:@"TextRecognitionEnhancementsEnabled"] || [key isEqualToString:@"ImageAnalysisQueueEnabled"] || [key isEqualToString:@"RemoveBackgroundEnabled"])
+        if ([key isEqualToString:@"TextRecognitionInVideosEnabled"] || [key isEqualToString:@"VisualTranslationEnabled"] || [key isEqualToString:@"RemoveBackgroundEnabled"])
             [[configuration preferences] _setEnabled:YES forInternalDebugFeature:feature];
     }
     [configuration _setAttachmentElementEnabled:YES];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to