blob: b61e1b9b4d9fae0cbc6d8b8e4e34261899a99bf1 [file] [edit]
<!DOCTYPE html>
<meta charset=utf-8>
<title>File's lastModified</title>
<link rel=help href="https://w3c.github.io/FileAPI/#dfn-lastModified">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
"use strict";
promise_test(async t => {
const before = Date.now();
const file = new File([], "dummy");
const after = Date.now();
await t.step_wait(() => Date.now() > after, "The clock advances beyond construction");
assert_between_inclusive(file.lastModified, before, after);
}, "lastModified defaults to the time of construction");
</script>