Skip to content

Commit

Permalink
Fix attachment tests -folder-icon, -type-attribute, -default-icon
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=265962
rdar://119272478

Reviewed by Tim Nguyen.

Let the attachments settle with the expected icons before taking a
screenshot.

* LayoutTests/fast/attachment/attachment-default-icon-expected.html:
* LayoutTests/fast/attachment/attachment-default-icon.html:
* LayoutTests/fast/attachment/attachment-folder-icon-expected.html:
* LayoutTests/fast/attachment/attachment-folder-icon.html:
* LayoutTests/fast/attachment/attachment-type-attribute-expected.html:
* LayoutTests/fast/attachment/attachment-type-attribute.html:
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:

Canonical link: https://commits.webkit.org/272293@main
  • Loading branch information
squelart committed Dec 19, 2023
1 parent 0ff5cc8 commit d773ccf
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<!DOCTYPE html><!-- webkit-test-runner [ AttachmentElementEnabled=true ] -->
<html>
<html class="reftest-wait">
<body>
<attachment id="attachment" title=" " type="public.data"></attachment>
<script src="resources/attachment-test-utils.js"></script>
<script>
takeExpectedScreenshotWhenAttachmentsSettled();
</script>
</body>
</html>
6 changes: 5 additions & 1 deletion LayoutTests/fast/attachment/attachment-default-icon.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<!DOCTYPE html><!-- webkit-test-runner [ AttachmentElementEnabled=true ] -->
<html>
<html class="reftest-wait">
<body>
<attachment title=" "></attachment>
<script src="resources/attachment-test-utils.js"></script>
<script>
takeActualScreenshotWhenAttachmentsSettled();
</script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
<!DOCTYPE html><!-- webkit-test-runner [ AttachmentElementEnabled=true ] -->
<html>
<html class="reftest-wait">
<body>
<attachment title=" "></attachment>
<attachment title=" "></attachment>
<script src="resources/attachment-test-utils.js"></script>
<script>
if (window.internals)
file = window.internals.createFile("resources/");

var attachments = document.getElementsByTagName("attachment");
for (var i = 0; i < attachments.length; i++)
attachments[i].file = file;

takeExpectedScreenshotWhenAttachmentsSettled();
</script>
</body>
</html>
6 changes: 5 additions & 1 deletion LayoutTests/fast/attachment/attachment-folder-icon.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="multipart/x-folder"></attachment>
<attachment title=" " type="application/vnd.apple.folder"></attachment>
<script src="resources/attachment-test-utils.js"></script>
<script>
takeActualScreenshotWhenAttachmentsSettled();
</script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<!DOCTYPE html><!-- webkit-test-runner [ AttachmentElementEnabled=true ] -->
<html>
<html class="reftest-wait">
<body>
<attachment id="attachment" title=" "></attachment>
<script src="resources/attachment-test-utils.js"></script>
<script>
var file;
if (window.internals)
file = window.internals.createFile("resources/test-file.txt");

document.getElementById("attachment").file = file;

takeExpectedScreenshotWhenAttachmentsSettled();
</script>
</body>
</html>
6 changes: 5 additions & 1 deletion LayoutTests/fast/attachment/attachment-type-attribute.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<!DOCTYPE html><!-- webkit-test-runner [ AttachmentElementEnabled=true ] -->
<html>
<html class="reftest-wait">
<body>
<attachment type="text/plain" title=" "></attachment>
<script src="resources/attachment-test-utils.js"></script>
<script>
takeActualScreenshotWhenAttachmentsSettled();
</script>
</body>
</html>
3 changes: 3 additions & 0 deletions LayoutTests/platform/mac-wk1/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -1871,6 +1871,9 @@ 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 ]
webkit.org/b/265962 fast/attachment/attachment-folder-icon.html [ Skip ]
webkit.org/b/265962 fast/attachment/attachment-type-attribute.html [ Skip ]
webkit.org/b/265962 fast/attachment/attachment-default-icon.html [ Skip ]

# <rdar://problem/42625657> REGRESSION (Mojave): 12 fast/images tests timing out on WK1
fast/images/animated-heics-draw.html [ Skip ]
Expand Down
5 changes: 0 additions & 5 deletions LayoutTests/platform/mac-wk2/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -1955,11 +1955,6 @@ http/wpt/opener/child-access-parent-via-windowproxy.html [ Pass ]
http/wpt/opener/iframe-access-top-via-windowproxy.html [ Pass ]
http/wpt/opener/parent-access-child-via-windowproxy.html [ Pass ]

# rdar://119272478 (REGRESSION ( Sonoma?): [ Sonoma Release wk2 ] 3 tests in fast/attachment are a flaky failure with image diff)
[ Sonoma+ Release ] fast/attachment/attachment-folder-icon.html [ Pass Failure ]
[ Sonoma+ Release ] fast/attachment/attachment-type-attribute.html [ Pass Failure ]
[ Sonoma+ Release ] fast/attachment/attachment-default-icon.html [ Pass Failure ]

webkit.org/b/265957 [ Release ] fullscreen/full-screen-layer-dump.html [ Pass Failure ]

# rdar://102425691 ([ New Test ](256068@main): [ Ventura+ ] http/wpt/webcodecs/videoFrame-colorSpace.html is a consistent failure)
Expand Down

0 comments on commit d773ccf

Please sign in to comment.