| Index: LayoutTests/http/tests/security/anchor-download-allow-blob.html
|
| diff --git a/LayoutTests/http/tests/security/anchor-download-allow-blob.html b/LayoutTests/http/tests/security/anchor-download-allow-blob.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a56f6a77afa73633147ad318a0609a55900f39ad
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/security/anchor-download-allow-blob.html
|
| @@ -0,0 +1,39 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<script src="/js-test-resources/js-test.js"></script>
|
| +<script type='text/javascript'>
|
| +if (window.testRunner) {
|
| + // The test will end when loadURLExternally() is invoked.
|
| + testRunner.waitUntilExternalURLLoad();
|
| +}
|
| +</script>
|
| +</head>
|
| +<body>
|
| +<p>
|
| +Tests that a suggested filename on a download attribute is allowed if
|
| +<a id="dl" download="foo.pdf">the link</a> is a blob URL.
|
| +<p>
|
| +The suggested filename at the top should be foo.pdf.
|
| +<script>
|
| +function click(elmt)
|
| +{
|
| + if (!window.eventSender) {
|
| + return;
|
| + }
|
| + eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
|
| + eventSender.mouseDown();
|
| + eventSender.mouseUp();
|
| +}
|
| +
|
| +function runTest()
|
| +{
|
| + var blob = new Blob(["Hello world!"], {type: "application/octet-stream"});
|
| + var link = document.getElementById("dl");
|
| + link.href = window.URL.createObjectURL(blob);
|
| + click(link);
|
| +}
|
| +runTest();
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|