diff --git a/FirebaseDynamicLinks/Tests/Unit/FIRDynamicLinksTest.m b/FirebaseDynamicLinks/Tests/Unit/FIRDynamicLinksTest.m index bf81cf862e1..3e57fe38990 100644 --- a/FirebaseDynamicLinks/Tests/Unit/FIRDynamicLinksTest.m +++ b/FirebaseDynamicLinks/Tests/Unit/FIRDynamicLinksTest.m @@ -1615,7 +1615,18 @@ - (void)testValidCustomDomainNames { NSArray *longFDLURLStrings = @[ @"https://a.firebase.com/mypath/?link=https://abcd&test=1", // Long FDL starting with // https://a.firebase.com/mypath + @"https://google.com?link=http://abcd", // Long FDL starting with 'https://google.com' @"https://google.com/?link=http://abcd", // Long FDL starting with 'https://google.com' + @"https://google.com?link=https://somedomain&some=qry", // Long FDL with link param as another + // argument. + @"https://google.com/?link=https://somedomain&some=qry", // Long FDL with link param as another + // argument. + @"https://google.com?some=qry&link=https://somedomain", // Long FDL with link param as second + // argument. + @"https://google.com/?some=qry&link=https://somedomain", // Long FDL with link param as second + // argument + @"https://google.com/?a=b&c=d&link=https://somedomain&y=z", // Long FDL with link param as + // middle argument argument ]; for (NSString *urlString in urlStrings) { NSURL *url = [NSURL URLWithString:urlString]; @@ -1638,15 +1649,17 @@ - (void)testInvalidCustomDomainNames { // https://a.firebase.com/mypath NSArray *urlStrings = @[ - @"google.com", // Valid domain. No scheme. - @"https://google.com", // Valid domain. No path after domainURIPrefix. - @"https://google.com/", // Valid domain. No path after domainURIPrefix. - @"https://google.co.in/mylink", // No matching domainURIPrefix. - @"https://firebase.com/mypath", // No matching domainURIPrefix: Invalid (sub)domain. - @"https://b.firebase.com/mypath", // No matching domainURIPrefix: Invalid subdomain. - @"https://a.firebase.com/mypathabc", // No matching domainURIPrefix: Invalid subdomain. - @"mydomain.com", // https scheme not specified for domainURIPrefix. - @"http://mydomain", // Domain not in plist. No path after domainURIPrefix. + @"google.com", // Valid domain. No scheme. + @"https://google.com", // Valid domain. No path after domainURIPrefix. + @"https://google.com/", // Valid domain. No path after domainURIPrefix. + @"https://google.co.in/mylink", // No matching domainURIPrefix. + @"https://google.com/?some=qry", // Valid domain with no path and link param + @"https://google.com/?some=qry&link=bla", // Valid domain with no path and no valid link param + @"https://firebase.com/mypath", // No matching domainURIPrefix: Invalid (sub)domain. + @"https://b.firebase.com/mypath", // No matching domainURIPrefix: Invalid subdomain. + @"https://a.firebase.com/mypathabc", // No matching domainURIPrefix: Invalid subdomain. + @"mydomain.com", // https scheme not specified for domainURIPrefix. + @"http://mydomain", // Domain not in plist. No path after domainURIPrefix. @"https://somecustom.com?", @"https://somecustom.com/?", @"https://somecustom.com?somekey=someval" ];