blob: a22f61ccef2ed82e872a12b2807603c9c8fc6dac [file] [log] [blame]
<!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>
<a id="blob-url">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()
{
var string = "<!doctype html><html><head><title>Title</title><script>if (window.testRunner) testRunner.dumpAsText(); </" + "script></head><body>FAIL</body><script>if (window.testRunner) testRunner.notifyDone();</scr" + "ipt></html>";
var blob = new Blob([string], {type: "text/html"});
var link = document.getElementById("blob-url");
link.href = window.URL.createObjectURL(blob);
link.setAttribute('download', '');
click(link);
}
runTest();
</script>
</body>
</html>