Commit 242275ea authored by twellington's avatar twellington Committed by Commit bot

Add logic to parse "data:" URLs to RoundedIconGenerator.java

BUG=505430

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

Cr-Commit-Position: refs/heads/master@{#339769}
parent 819470e7
......@@ -187,6 +187,6 @@ public class RoundedIconGenerator {
Log.w(TAG, "Unable to parse the URL for generating an icon: " + url);
}
return null;
return url;
}
}
......@@ -49,7 +49,9 @@ public class RoundedIconGeneratorTest extends NativeLibraryTestBase {
assertEquals("google-chrome", getIconTextForUrl("https://google-chrome/", false));
assertEquals("127.0.0.1", getIconTextForUrl("http://127.0.0.1/", false));
// Verify that file:// URLs will still return NULL.
assertNull(getIconTextForUrl("file:///home/chrome/test.html", false));
// Verify that the fallback is the the URL itself.
assertEquals("file:///home/chrome/test.html",
getIconTextForUrl("file:///home/chrome/test.html", false));
assertEquals("data:image", getIconTextForUrl("data:image", false));
}
}
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