<!DOCTYPE html>
<html>
<head>
    <script src="../../../../resources/js-test.js"></script>
    <script src="../../../../resources/ui-helper.js"></script>
</head>
<body>
    <input id="input" type="file" accept=".pdf, image/jpeg">
</body>
<script>

jsTestIsAsync = true;

addEventListener("load", async () => {
    description("Tests that a PDF file, chosen via the file picker which accepts PDF files and JPEG images, has a non-zero file size. To test manually, click on the file input and select a PDF file.");

    if (window.testRunner)
        testRunner.setOpenPanelFiles(['resources/documents/document.pdf']);

    input.addEventListener("change", (event) => {
        fileList = event.target.files;
        shouldBe("fileList.length", "1");

        file = fileList[0];
        shouldBe("file.size", "10820");

        finishJSTest();
    });

    UIHelper.activateElement(input);
});

</script>
</html>
