Commit a06788a3 authored by qinmin's avatar qinmin Committed by Commit bot

Make blob scheme donwloadable through context menu

Currently filesystem and data URIs are downloadable from context menu
Blob urls should also be supported.
Context menu downloads are handled by Chrome's network stack.
So blob urls will be handled appropriately.

BUG=481497

Review URL: https://codereview.chromium.org/1126233011

Cr-Commit-Position: refs/heads/master@{#330777}
parent 46051f4b
......@@ -35,7 +35,7 @@ public class UrlUtilities {
* URI schemes that Chrome can download.
*/
private static final HashSet<String> DOWNLOADABLE_SCHEMES = CollectionUtil.newHashSet(
"data", "filesystem", "http", "https");
"data", "filesystem", "http", "https", "blob");
/**
* URI schemes that are internal to Chrome.
......
......@@ -43,6 +43,7 @@ public class UrlUtilitiesTest extends InstrumentationTestCase {
"https://user:pass@:awesome.com:9000/bad-scheme:#fake:"));
assertTrue(UrlUtilities.isDownloadableScheme("http://awesome.example.com/"));
assertTrue(UrlUtilities.isDownloadableScheme("filesystem://awesome.example.com/"));
assertTrue(UrlUtilities.isDownloadableScheme("blob:https%3A//awesome.example.com/"));
assertFalse(UrlUtilities.isDownloadableScheme("inline:skates.co.uk"));
assertFalse(UrlUtilities.isDownloadableScheme("javascript:alert(1)"));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment