38 lines
980 B
HTML
38 lines
980 B
HTML
<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
|
|
<html>
|
|
<head>
|
|
<meta name="viewport" content="width=device-width">
|
|
<script src="../../../resources/ui-helper.js"></script>
|
|
<script>
|
|
if (window.testRunner) {
|
|
testRunner.dumpAsText();
|
|
testRunner.setShouldLogDownloadCallbacks(true);
|
|
testRunner.waitUntilDownloadFinished();
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<p>The suggested filename above should be "abe.png" and the download should succeed.</p>
|
|
<a id="blob-url" download="abe.png" target="_blank">File backed blob URL</a>
|
|
<script>
|
|
function click(elmt)
|
|
{
|
|
if (!window.eventSender) {
|
|
alert('Click the link to run the test.');
|
|
return;
|
|
}
|
|
UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
|
|
}
|
|
|
|
function runTest()
|
|
{
|
|
file = internals.createFile("../resources/abe.png");
|
|
var link = document.getElementById("blob-url");
|
|
link.href = window.URL.createObjectURL(file);
|
|
click(link);
|
|
}
|
|
runTest();
|
|
</script>
|
|
</body>
|
|
</html>
|