blob: 9483601e704ff24c5a43281d6ea1cbfb3d3cb83c [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<head>
<meta name="viewport" content="width=device-width">
<script src="/js-test-resources/ui-helper.js"></script>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setShouldLogDownloadCallbacks(true);
testRunner.waitUntilDownloadFinished();
}
</script>
</head>
<body>
<img id="testImage" src="/resources/square100.png" usemap="#testmap">
<map name="testmap">
<area shape="rect" coords="0,0,100,100" href="resources/FAIL-notify-done.html" alt="Test" download="foo.pdf">
</map>
<p>Tests that the download attribute on area elements is working.</p>
<p>The suggested filename at the top should be foo.pdf.</p>
<script>
function click(elmt)
{
if (!window.eventSender)
return;
UIHelper.activateAt(elmt.offsetLeft + 10, elmt.offsetTop + 10);
}
function runTest()
{
var img = document.getElementById("testImage");
click(img);
}
onload = function() {
runTest();
}
</script>
</body>
</html>