Changeset 251931 in webkit
- Timestamp:
- Nov 1, 2019 11:27:00 AM (4 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r251927 r251931 1 2019-11-01 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 TestWebKitAPI.EditorStateTests.TypingAttributesTextAlignmentStartEnd is flaky in iOS simulator 4 https://bugs.webkit.org/show_bug.cgi?id=203733 5 <rdar://problem/56814640> 6 7 Reviewed by Tim Horton. 8 9 Try to fix the flaky test by making EditingTestHarness more robust. Instead of checking for expected editor 10 state entries after the next presentation update, wait for the latest editor state entry to contain the expected 11 values. 12 13 * TestWebKitAPI/EditingTestHarness.mm: 14 (-[EditingTestHarness _execCommand:argument:expectEntries:]): 15 16 Preserve the existing log statement by printing it out once after a few seconds, if the entry is still not found 17 in the last known editor state. 18 1 19 2019-11-01 Aakash Jain <aakash_jain@apple.com> 2 20 -
trunk/Tools/TestWebKitAPI/EditingTestHarness.mm
r242339 r251931 191 191 TestWebKitAPI::Util::run(&done); 192 192 193 [_webView waitForNextPresentationUpdate];194 195 193 EXPECT_TRUE(result); 196 194 if (!result) 197 195 NSLog(@"Failed to execute editing command: ('%@', '%@')", command, argument ?: @""); 198 196 199 BOOL containsEntries = [self latestEditorStateContains:entries]; 200 EXPECT_TRUE(containsEntries); 201 if (!containsEntries) 202 NSLog(@"Expected %@ to contain %@", self.latestEditorState, entries); 197 const NSTimeInterval loggingTimeout = 3; 198 auto startTime = retainPtr([NSDate date]); 199 BOOL hasLoggedWarning = NO; 200 BOOL containsEntries; 201 do { 202 [_webView waitForNextPresentationUpdate]; 203 containsEntries = [self latestEditorStateContains:entries]; 204 if (!hasLoggedWarning && [[NSDate date] timeIntervalSinceDate:startTime.get()] > loggingTimeout) { 205 NSLog(@"Expected %@ to contain %@", self.latestEditorState, entries); 206 hasLoggedWarning = YES; 207 } 208 } while (!containsEntries); 203 209 } 204 210
Note: See TracChangeset
for help on using the changeset viewer.