blob: 558820426f185e0f406f5278842ecdd07919801b [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<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;
eventSender.mouseMoveTo(elmt.offsetLeft + 10, elmt.offsetTop + 10);
eventSender.mouseDown();
eventSender.mouseUp();
}
function runTest()
{
var img = document.getElementById("testImage");
click(img);
}
onload = function() {
runTest();
}
</script>
</body>
</html>