Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLAreaElement/area-download.html

Issue 2050643002: HTMLAreaElement should expose `download` and `rel` attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final version Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/HTMLAreaElement/area-download-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/HTMLAreaElement/area-download-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698