38 lines
1.1 KiB
HTML
38 lines
1.1 KiB
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 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;
|
|
}
|
|
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>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>
|