Chromium Code Reviews| 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..3f0e56e1488dbc68677dc05741c70ec61d832b43 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="blob" shape="rect" coords="0, 0, 100, 100"> |
|
dominicc (has gone to gerrit)
2016/06/23 04:20:19
Could we make this a different string, since 'blob
|
| +</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> |