Title: [286547] trunk/Tools
Revision
286547
Author
wenson_hs...@apple.com
Date
2021-12-06 10:27:41 -0800 (Mon, 06 Dec 2021)

Log Message

[iOS] AppHighlights.AppHighlightCreateAndRestoreAndScroll is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=233828

Reviewed by Tim Horton.

This test began to sometimes fail on iOS 15 API test runners in EWS after enabling `APP_HIGHLIGHTS` in non-
internal builds. Make this test more robust by waiting for scrolling to the restored highlight.

* TestWebKitAPI/Tests/WebKitCocoa/WKAppHighlights.mm:
(TestWebKitAPI::TEST):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (286546 => 286547)


--- trunk/Tools/ChangeLog	2021-12-06 18:20:43 UTC (rev 286546)
+++ trunk/Tools/ChangeLog	2021-12-06 18:27:41 UTC (rev 286547)
@@ -1,3 +1,16 @@
+2021-12-06  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        [iOS] AppHighlights.AppHighlightCreateAndRestoreAndScroll is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=233828
+
+        Reviewed by Tim Horton.
+
+        This test began to sometimes fail on iOS 15 API test runners in EWS after enabling `APP_HIGHLIGHTS` in non-
+        internal builds. Make this test more robust by waiting for scrolling to the restored highlight.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/WKAppHighlights.mm:
+        (TestWebKitAPI::TEST):
+
 2021-12-06  Alex Christensen  <achristen...@webkit.org>
 
         WKWebpagePreferences._activeContentRuleListActionPatterns should be an NSDictionary of identifier to allowed patterns

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAppHighlights.mm (286546 => 286547)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAppHighlights.mm	2021-12-06 18:20:43 UTC (rev 286546)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAppHighlights.mm	2021-12-06 18:27:41 UTC (rev 286547)
@@ -108,9 +108,9 @@
     [webViewRestore _restoreAndScrollToAppHighlight:[highlight highlight]];
 
     TestWebKitAPI::Util::waitForConditionWithLogging([&] () -> bool {
-        return [webViewRestore stringByEvaluatingJavaScript:@"internals.numberOfAppHighlights()"].intValue == 1;
-    }, 2, @"Expected Highlights to be populated.");
-    EXPECT_NE(0, [[webViewRestore objectByEvaluatingJavaScript:@"pageYOffset"] floatValue]);
+        return [webViewRestore stringByEvaluatingJavaScript:@"internals.numberOfAppHighlights()"].intValue == 1
+            && [[webViewRestore objectByEvaluatingJavaScript:@"pageYOffset"] floatValue] > 0;
+    }, 2, @"Expected Highlights to be populated and the page to scroll.");
 }
 
 TEST(AppHighlights, AppHighlightRestoreFailure)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to