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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script type='text/javascript'> 4 <script type='text/javascript'>
5 if (window.testRunner) { 5 if (window.testRunner) {
6 testRunner.dumpAsText(); 6 testRunner.dumpAsText();
7 testRunner.waitUntilDone(); 7 testRunner.waitUntilExternalURLLoad();
8 } 8 }
9 </script> 9 </script>
10 </head> 10 </head>
11 <body> 11 <body>
12 <a id="blob-url" download>Blob URL</a> 12 <map name="imagemap">
13 <area id="area" download="foo" shape="rect" coords="0, 0, 100, 100">
14 </map>
15 <img width="100" height="100" usemap="#imagemap"/>
13 <script> 16 <script>
14 function click(elmt) 17 function click(elmt)
15 { 18 {
16 if (!window.eventSender) { 19 if (!window.eventSender) {
17 alert('Click the link to run the test.'); 20 alert('Click the area to run the test.');
18 return; 21 return;
19 } 22 }
20 eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); 23 eventSender.mouseMoveTo(elmt.offsetLeft + elmt.offsetWidth / 2, elmt.offsetT op + elmt.offsetHeight / 2);
21 eventSender.mouseDown(); 24 eventSender.mouseDown();
22 eventSender.mouseUp(); 25 eventSender.mouseUp();
23 } 26 }
24 27
25 function runTest() 28 function runTest()
26 { 29 {
27 var string = "<!doctype html><html><head><title>Title</title><script>if (win dow.testRunner) testRunner.dumpAsText(); </" + "script></head><body>PASS</body>< script>if (window.testRunner) testRunner.notifyDone();</scr" + "ipt></html>"; 30 var string = "<!doctype html><html><head><title>Title</title><script>if (win dow.testRunner) testRunner.dumpAsText(); </" + "script></head><body>PASS</body>< /html>";
28 var blob = new Blob([string], {type: "text/html"}); 31 var blob = new Blob([string], {type: "text/html"});
29 var link = document.getElementById("blob-url"); 32 var area = document.getElementById("area");
30 link.href = window.URL.createObjectURL(blob); 33 area.href = window.URL.createObjectURL(blob);
31 click(link); 34 click(area);
32 } 35 }
33 runTest(); 36 runTest();
34 </script> 37 </script>
35 </body> 38 </body>
36 </html> 39 </html>
OLDNEW
« 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