blob: e6e8b19e6806f934388d411284afd2d59c1c5775 [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ AttachmentElementEnabled=true ] -->
<html>
<head>
<meta charset="utf-8">
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("This tests that attachments have an instance type of HTMLElement.");
var attachment = document.createElement("attachment");
shouldBeType("attachment", "HTMLAttachmentElement");
var file;
if (window.internals) {
file = window.internals.createFile("resources/test-file.txt");
}
shouldBeNull("attachment.file");
debug("Setting attachment.file to a file created from resources/test-file.txt")
attachment.file = file;
shouldBe("attachment.file", "file");
shouldBe("attachment.file.name", "'test-file.txt'");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>