mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1590922 follow-up: the parts that didn't land in the first landing
Differential Revision: https://phabricator.services.mozilla.com/D50889 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
8c1d9bf15d
commit
214c8d96df
@ -10214,7 +10214,8 @@ bool nsContentUtils::IsURIInList(nsIURI* aURI, const nsCString& aBlackList) {
|
||||
(filePath.Length() == pathInBlackList.Length() ||
|
||||
pathInBlackList.EqualsLiteral("/") ||
|
||||
filePath[pathInBlackList.Length()] == '/' ||
|
||||
filePath[pathInBlackList.Length()] == '?')) {
|
||||
filePath[pathInBlackList.Length()] == '?' ||
|
||||
filePath[pathInBlackList.Length()] == '#')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ TEST(DOM_Base_ContentUtils, IsURIInList)
|
||||
nsCOMPtr<nsIURI> uri, subURI;
|
||||
nsresult rv =
|
||||
NS_NewURI(getter_AddRefs(uri),
|
||||
NS_LITERAL_CSTRING("https://example.com/path/favicon.ico"));
|
||||
NS_LITERAL_CSTRING("https://example.com/path/favicon.ico#"));
|
||||
ASSERT_TRUE(rv == NS_OK);
|
||||
|
||||
rv = NS_NewURI(getter_AddRefs(subURI),
|
||||
@ -46,6 +46,7 @@ TEST(DOM_Base_ContentUtils, IsURIInList)
|
||||
{NS_LITERAL_CSTRING("*.example.com/path,example.com/path"), true, false},
|
||||
{NS_LITERAL_CSTRING("example.com/path,*.example.com/path"), true, false},
|
||||
{NS_LITERAL_CSTRING("*.example.com/favicon.ico"), false, true},
|
||||
{NS_LITERAL_CSTRING("example.com/path/favicon.ico"), true, false},
|
||||
{NS_LITERAL_CSTRING("*.example.com"), false, true},
|
||||
{NS_LITERAL_CSTRING("example.com"), true, false},
|
||||
{NS_LITERAL_CSTRING("foo.com"), false, false},
|
||||
|
Loading…
Reference in New Issue
Block a user