blob: 154d9a29a2470d2a46f36669f5c53639360eb726 [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ enableAttachmentElement=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>