Skip to content

Commit

Permalink
Stabilise attachment-uti.html with reftest-wait and takeScreenshotWhe…
Browse files Browse the repository at this point in the history
…nAttachmentsSettled

https://bugs.webkit.org/show_bug.cgi?id=263085
rdar://116877284

Reviewed by Aditya Keerthi.

Attachment-uti.html was flaky, with the actual and/or expected rendering
sometimes missing the icon, because that icon is only fetched during the
first rendering. Use reftest-wait and takeScreenshotWhenAttachmentsSettled
to delay the test screenshot until there is an icon.

* LayoutTests/fast/attachment/attachment-uti-expected.html:
* LayoutTests/fast/attachment/attachment-uti.html:
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:

Canonical link: https://commits.webkit.org/269670@main
  • Loading branch information
squelart committed Oct 23, 2023
1 parent 82de229 commit 68f1a33
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
6 changes: 5 additions & 1 deletion LayoutTests/fast/attachment/attachment-uti-expected.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<!DOCTYPE html><!-- webkit-test-runner [ AttachmentElementEnabled=true ] -->
<html>
<html class="reftest-wait">
<body>
<attachment title=" " type="image/jpeg"></attachment>
<attachment title=" " type="text/plain"></attachment>
<script src="resources/attachment-test-utils.js"></script>
<script>
takeExpectedScreenshotWhenAttachmentsSettled();
</script>
</body>
</html>
6 changes: 5 additions & 1 deletion LayoutTests/fast/attachment/attachment-uti.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<!DOCTYPE html><!-- webkit-test-runner [ AttachmentElementEnabled=true ] -->
<html>
<html class="reftest-wait">
<body>
<attachment title=" " type="public.jpeg"></attachment>
<attachment title=" " type="public.plain-text"></attachment>
<script src="resources/attachment-test-utils.js"></script>
<script>
takeActualScreenshotWhenAttachmentsSettled();
</script>
</body>
</html>
1 change: 1 addition & 0 deletions LayoutTests/platform/mac-wk1/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -1850,6 +1850,7 @@ imported/w3c/web-platform-tests/html/rendering/replaced-elements/embedded-conten

# "reftest-wait" blocks attachment rendering.
webkit.org/b/263367 fast/attachment/attachment-icon-from-file-extension.html [ Skip ]
webkit.org/b/263367 fast/attachment/attachment-uti.html [ Skip ]

# <rdar://problem/42625657> REGRESSION (Mojave): 12 fast/images tests timing out on WK1
fast/images/animated-heics-draw.html [ Skip ]
Expand Down
2 changes: 0 additions & 2 deletions LayoutTests/platform/mac-wk2/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -2000,8 +2000,6 @@ webkit.org/b/177397 [ Sonoma+ Release ] compositing/masks/compositing-clip-path-

webkit.org/b/263049 [ Sonoma+ ] fast/forms/scroll-into-view-and-show-validation-message.html [ Pass Failure ]

webkit.org/b/263085 [ Sonoma+ Release ] fast/attachment/attachment-uti.html [ Pass ImageOnlyFailure ]

webkit.org/b/263095 [ Sonoma+ ] svg/clip-path/clip-path-objectboundingbox-003.svg [ Pass ImageOnlyFailure ]

webkit.org/b/263136 [ Sonoma+ ] imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-overrides-uax-behavior-011.html [ ImageOnlyFailure ]
Expand Down

0 comments on commit 68f1a33

Please sign in to comment.