Title: [255436] trunk/Tools
Revision
255436
Author
[email protected]
Date
2020-01-30 09:56:14 -0800 (Thu, 30 Jan 2020)

Log Message

TestWebKitAPI: Re-baseline AccessibilityTests for Catalyst
https://bugs.webkit.org/show_bug.cgi?id=206997

Reviewed by Wenson Hsieh.

* TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm:
(TestWebKitAPI::TEST):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (255435 => 255436)


--- trunk/Tools/ChangeLog	2020-01-30 17:48:57 UTC (rev 255435)
+++ trunk/Tools/ChangeLog	2020-01-30 17:56:14 UTC (rev 255436)
@@ -1,3 +1,13 @@
+2020-01-30  Jonathan Bedard  <[email protected]>
+
+        TestWebKitAPI: Re-baseline AccessibilityTests for Catalyst
+        https://bugs.webkit.org/show_bug.cgi?id=206997
+
+        Reviewed by Wenson Hsieh.
+
+        * TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm:
+        (TestWebKitAPI::TEST):
+
 2020-01-29  Jonathan Bedard  <[email protected]>
 
         run-safari / run-webkit-tests --ios-simulator not working with XCode 13.3.1 (11C504)

Modified: trunk/Tools/TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm (255435 => 255436)


--- trunk/Tools/TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm	2020-01-30 17:48:57 UTC (rev 255435)
+++ trunk/Tools/TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm	2020-01-30 17:56:14 UTC (rev 255436)
@@ -68,9 +68,15 @@
     [webView synchronouslyLoadHTMLString:@"<meta name='viewport' content='width=device-width,initial-scale=1'><span id='first'>first</span><span id='second'> second</span><br><span id='third'> third</span>"];
     [webView stringByEvaluatingJavaScript:@"document.execCommand('SelectAll')"];
 
+#if PLATFORM(MACCATALYST)
+    checkCGRectValueAtIndex([webView rectsAtSelectionOffset:0 withText:@"first"], CGRectMake(8, 8, 25, 19), 0);
+    checkCGRectValueAtIndex([webView rectsAtSelectionOffset:6 withText:@"second"], CGRectMake(36, 8, 46, 19), 0);
+    checkCGRectValueAtIndex([webView rectsAtSelectionOffset:13 withText:@"third"], CGRectMake(8, 27, 31, 19), 0);
+#else
     checkCGRectValueAtIndex([webView rectsAtSelectionOffset:0 withText:@"first"], CGRectMake(8, 8, 26, 19), 0);
     checkCGRectValueAtIndex([webView rectsAtSelectionOffset:6 withText:@"second"], CGRectMake(37, 8, 46, 19), 0);
     checkCGRectValueAtIndex([webView rectsAtSelectionOffset:13 withText:@"third"], CGRectMake(8, 27, 31, 20), 0);
+#endif
 }
 
 TEST(AccessibilityTests, RectsForSpeakingSelectionWithLineWrapping)
@@ -80,11 +86,19 @@
     [webView stringByEvaluatingJavaScript:@"document.execCommand('SelectAll')"];
 
     NSArray<NSValue *> *rects = [webView rectsAtSelectionOffset:0 withText:@"abcdefghijklmnopqrstuvwxyz"];
+#if PLATFORM(MACCATALYST)
+    checkCGRectValueAtIndex(rects, CGRectMake(8, 8, 304, 116), 0);
+    checkCGRectValueAtIndex(rects, CGRectMake(8, 124, 304, 116), 1);
+    checkCGRectValueAtIndex(rects, CGRectMake(8, 240, 304, 116), 2);
+    checkCGRectValueAtIndex(rects, CGRectMake(8, 356, 304, 116), 3);
+    checkCGRectValueAtIndex(rects, CGRectMake(8, 472, 145, 116), 4);
+#else
     checkCGRectValueAtIndex(rects, CGRectMake(8, 8, 304, 114), 0);
     checkCGRectValueAtIndex(rects, CGRectMake(8, 122, 304, 117), 1);
     checkCGRectValueAtIndex(rects, CGRectMake(8, 239, 304, 117), 2);
     checkCGRectValueAtIndex(rects, CGRectMake(8, 356, 304, 117), 3);
     checkCGRectValueAtIndex(rects, CGRectMake(8, 473, 145, 117), 4);
+#endif
 }
 
 TEST(AccessibilityTests, RectsForSpeakingSelectionDoNotCrashWhenChangingSelection)
@@ -109,14 +123,27 @@
     // Select first node and store the selection
     [webView stringByEvaluatingJavaScript:@"getSelection().setBaseAndExtent(first, 0, first, 1)"];
     [webView _accessibilityStoreSelection];
+#if PLATFORM(MACCATALYST)
+    checkCGRectValueAtIndex([webView rectsAtSelectionOffset:0 withText:@"first"], CGRectMake(8, 8, 25, 19), 0);
+#else
     checkCGRectValueAtIndex([webView rectsAtSelectionOffset:0 withText:@"first"], CGRectMake(8, 8, 26, 19), 0);
+#endif
+
     // Now select the second node, we should use the stored selection to retrieve rects
     [webView stringByEvaluatingJavaScript:@"getSelection().setBaseAndExtent(second, 0, second, 1)"];
+#if PLATFORM(MACCATALYST)
+    checkCGRectValueAtIndex([webView rectsAtSelectionOffset:0 withText:@"first"], CGRectMake(8, 8, 25, 19), 0);
+#else
     checkCGRectValueAtIndex([webView rectsAtSelectionOffset:0 withText:@"first"], CGRectMake(8, 8, 26, 19), 0);
+#endif
     
     // Clear the stored selection, we should use the current selection to retrieve rects
     [webView _accessibilityClearSelection];
+#if PLATFORM(MACCATALYST)
+    checkCGRectValueAtIndex([webView rectsAtSelectionOffset:0 withText:@"first"], CGRectMake(8, 27, 25, 19), 0);
+#else
     checkCGRectValueAtIndex([webView rectsAtSelectionOffset:0 withText:@"first"], CGRectMake(8, 27, 26, 20), 0);
+#endif
 }
 
 TEST(AccessibilityTests, WebProcessLoaderBundleLoaded)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to