blob: 94c36ec3bd055e017baf414a07fa51316fa41e10 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
</script>
</head>
<body>
<a id="blob-url" download>Blob URL</a>
<script>
function click(elmt)
{
if (!window.eventSender) {
alert('Click the link to run the test.');
return;
}
eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
eventSender.mouseDown();
eventSender.mouseUp();
}
function runTest()
{
var string = "<!doctype html><html><head><title>Title</title><script>if (window.testRunner) testRunner.dumpAsText(); </" + "script></head><body>PASS</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.removeAttribute('download');
click(link);
}
runTest();
</script>
</body>
</html>