⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 286547 in webkit


Ignore:
Timestamp:
Dec 6, 2021, 10:27:41 AM (5 years ago)
Author:
Wenson Hsieh
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):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r286545 r286547  
     12021-12-06  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        [iOS] AppHighlights.AppHighlightCreateAndRestoreAndScroll is a flaky failure
     4        https://bugs.webkit.org/show_bug.cgi?id=233828
     5
     6        Reviewed by Tim Horton.
     7
     8        This test began to sometimes fail on iOS 15 API test runners in EWS after enabling `APP_HIGHLIGHTS` in non-
     9        internal builds. Make this test more robust by waiting for scrolling to the restored highlight.
     10
     11        * TestWebKitAPI/Tests/WebKitCocoa/WKAppHighlights.mm:
     12        (TestWebKitAPI::TEST):
     13
    1142021-12-06  Alex Christensen  <achristensen@webkit.org>
    215
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAppHighlights.mm

    r279444 r286547  
    109109
    110110    TestWebKitAPI::Util::waitForConditionWithLogging([&] () -> bool {
    111         return [webViewRestore stringByEvaluatingJavaScript:@"internals.numberOfAppHighlights()"].intValue == 1;
    112     }, 2, @"Expected Highlights to be populated.");
    113     EXPECT_NE(0, [[webViewRestore objectByEvaluatingJavaScript:@"pageYOffset"] floatValue]);
     111        return [webViewRestore stringByEvaluatingJavaScript:@"internals.numberOfAppHighlights()"].intValue == 1
     112            && [[webViewRestore objectByEvaluatingJavaScript:@"pageYOffset"] floatValue] > 0;
     113    }, 2, @"Expected Highlights to be populated and the page to scroll.");
    114114}
    115115
Note: See TracChangeset for help on using the changeset viewer.