summaryrefslogtreecommitdiffstats
path: root/netwerk/test/mochitests/test_fetch_lnk.html
blob: e1154a5951f577cb69b4e19bc6d90b4df4c8f169 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE html>
<meta charset="utf-8">
<title>Downloading .lnk through HTTP should always download the file without parsing it</title>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script>
  SimpleTest.waitForExplicitFinish();
  // Download .lnk which points to a system executable
  fetch("file_lnk.lnk").then(async res => {
    ok(res.ok, "Download success");
    ok(res.url.endsWith("file_lnk.lnk"), "file name should be of the lnk file");
    is(res.headers.get("Content-Length"), "1531", "The size should be of the lnk file");
    SimpleTest.finish();
  }, () => {
    ok(false, "Unreachable code");
  })
</script>