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

Side by Side Diff: LayoutTests/http/tests/security/anchor-download-allow-data.html

Issue 300543002: Allow filename suggestions via a[download] for data URIs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/anchor-download-allow-data-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 src="/js-test-resources/js-test.js"></script> 4 <script src="/js-test-resources/js-test.js"></script>
5 <script type='text/javascript'> 5 <script type='text/javascript'>
6 if (window.testRunner) { 6 if (window.testRunner) {
7 // The test will end when loadURLExternally() is invoked. 7 // The test will end when loadURLExternally() is invoked.
8 testRunner.waitUntilExternalURLLoad(); 8 testRunner.waitUntilExternalURLLoad();
9 } 9 }
10 </script> 10 </script>
11 </head> 11 </head>
12 <body> 12 <body>
13 <p> 13 <p>
14 Tests that a suggested filename on a download attribute is allowed if 14 Tests that a suggested filename on a download attribute is allowed if
15 <a id="dl" href="/security/resources/attachment.php" download="foo.pdf">the link </a> is in the same origin. 15 <a id="dl" href="data:application/octet-stream,Hello" download="foo.pdf">the lin k</a> is a data URL.
16 <p> 16 <p>
17 The suggested filename at the top should be foo.pdf. 17 The suggested filename at the top should be foo.pdf.
18 <script> 18 <script>
19 function click(elmt) 19 function click(elmt)
20 { 20 {
21 if (!window.eventSender) { 21 if (!window.eventSender) {
22 return; 22 return;
23 } 23 }
24 eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); 24 eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
25 eventSender.mouseDown(); 25 eventSender.mouseDown();
26 eventSender.mouseUp(); 26 eventSender.mouseUp();
27 } 27 }
28 28
29 function runTest() 29 function runTest()
30 { 30 {
31 var link = document.getElementById("dl"); 31 var link = document.getElementById("dl");
32 click(link); 32 click(link);
33 } 33 }
34 runTest(); 34 runTest();
35 </script> 35 </script>
36 </body> 36 </body>
37 </html> 37 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/anchor-download-allow-data-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698