| Index: third_party/WebKit/LayoutTests/fast/dom/HTMLAreaElement/area-download.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLAnchorElement/anchor-download.html b/third_party/WebKit/LayoutTests/fast/dom/HTMLAreaElement/area-download.html
|
| similarity index 51%
|
| copy from third_party/WebKit/LayoutTests/fast/dom/HTMLAnchorElement/anchor-download.html
|
| copy to third_party/WebKit/LayoutTests/fast/dom/HTMLAreaElement/area-download.html
|
| index d18ba7c48b07bf5977287999f9a9ca867f58b33c..855ec5093552bc576c9a311e9b9b2cab749651b8 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/dom/HTMLAnchorElement/anchor-download.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/dom/HTMLAreaElement/area-download.html
|
| @@ -4,31 +4,34 @@
|
| <script type='text/javascript'>
|
| if (window.testRunner) {
|
| testRunner.dumpAsText();
|
| - testRunner.waitUntilDone();
|
| + testRunner.waitUntilExternalURLLoad();
|
| }
|
| </script>
|
| </head>
|
| <body>
|
| -<a id="blob-url" download>Blob URL</a>
|
| +<map name="imagemap">
|
| + <area id="area" download="foo" shape="rect" coords="0, 0, 100, 100">
|
| +</map>
|
| +<img width="100" height="100" usemap="#imagemap"/>
|
| <script>
|
| function click(elmt)
|
| {
|
| if (!window.eventSender) {
|
| - alert('Click the link to run the test.');
|
| + alert('Click the area to run the test.');
|
| return;
|
| }
|
| - eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
|
| + eventSender.mouseMoveTo(elmt.offsetLeft + elmt.offsetWidth / 2, elmt.offsetTop + elmt.offsetHeight / 2);
|
| 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 string = "<!doctype html><html><head><title>Title</title><script>if (window.testRunner) testRunner.dumpAsText(); </" + "script></head><body>PASS</body></html>";
|
| var blob = new Blob([string], {type: "text/html"});
|
| - var link = document.getElementById("blob-url");
|
| - link.href = window.URL.createObjectURL(blob);
|
| - click(link);
|
| + var area = document.getElementById("area");
|
| + area.href = window.URL.createObjectURL(blob);
|
| + click(area);
|
| }
|
| runTest();
|
| </script>
|
|
|