blob: 38ec7806fb5fde414eef27ad1e7248ca4be0d26e [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setShouldLogDownloadCallbacks(true);
testRunner.waitUntilDownloadFinished();
}
</script>
</head>
<body>
<p>The suggested filename above should be "foo.txt" and the download should succeed.</p>
<a id="blob-url" download="foo">Memory backed blob URL</a>
<script>
function runTest()
{
file = new File(["foo"], "foo.txt", {
type: "text/plain"
});
var link = document.getElementById("blob-url");
link.href = window.URL.createObjectURL(file);
link.click();
// Revoke the URL right away.
window.URL.revokeObjectURL(link.href);
}
runTest();
</script>
</body>
</html>