@@ -1100,17 +1100,27 @@ - (void)testResolveLinkRespectsResponseErrorStatusCode {
1100
1100
1101
1101
- (void )testPassMatchesShortLinkFormatForDDLDomains {
1102
1102
NSArray <NSString *> *urlStrings = @[
1103
- @" https://someapp.app.goo.gl/somepath" , @" https://someapp.app.goo.gl/link" ,
1103
+ @" https://someapp.app.goo.gl/somepath" ,
1104
+ @" https://someapp.app.goo.gl/link" ,
1104
1105
@" https://someapp.app.goo.gl/somepath?link=https://somedomain" ,
1105
1106
@" https://someapp.app.goo.gl/somepath?somekey=somevalue" ,
1106
1107
@" https://someapp.app.goo.gl/somepath/?link=https://somedomain" ,
1107
1108
@" https://someapp.app.goo.gl/somepath/?somekey=somevalue" ,
1108
- @" https://someapp.page.link/somepath" , @" https://someapp.page.link/link" ,
1109
+ @" https://someapp.app.google/somepath" ,
1110
+ @" https://someapp.app.google/link" ,
1111
+ @" https://someapp.app.google/somepath?link=https://somedomain" ,
1112
+ @" https://someapp.app.google/somepath?somekey=somevalue" ,
1113
+ @" https://someapp.app.google/somepath/?link=https://somedomain" ,
1114
+ @" https://someapp.app.google/somepath/?somekey=somevalue" ,
1115
+ @" https://someapp.page.link/somepath" ,
1116
+ @" https://someapp.page.link/link" ,
1109
1117
@" https://someapp.page.link/somepath?link=https://somedomain" ,
1110
1118
@" https://someapp.page.link/somepath?somekey=somevalue" ,
1111
1119
@" https://someapp.page.link/somepath/?link=https://somedomain" ,
1112
- @" https://someapp.page.link/somepath/?somekey=somevalue" , @" http://someapp.page.link/somepath" ,
1113
- @" http://someapp.page.link/link" , @" http://someapp.page.link/somepath?link=https://somedomain" ,
1120
+ @" https://someapp.page.link/somepath/?somekey=somevalue" ,
1121
+ @" http://someapp.page.link/somepath" ,
1122
+ @" http://someapp.page.link/link" ,
1123
+ @" http://someapp.page.link/somepath?link=https://somedomain" ,
1114
1124
@" http://someapp.page.link/somepath?somekey=somevalue" ,
1115
1125
@" http://someapp.page.link/somepath/?link=http://somedomain" ,
1116
1126
@" http://someapp.page.link/somepath/?somekey=somevalue"
@@ -1136,6 +1146,15 @@ - (void)testFailMatchesShortLinkFormat {
1136
1146
@" https://someapp.app.goo.gl/somepath/somepath2" ,
1137
1147
@" https://someapp.app.goo.gl/somepath/somepath2?somekey=somevalue" ,
1138
1148
@" https://someapp.app.goo.gl/somepath/somepath2?link=https://somedomain" ,
1149
+ @" https://someapp.app.google" ,
1150
+ @" https://someapp.app.google/" ,
1151
+ @" https://someapp.app.google?" ,
1152
+ @" https://someapp.app.google/?" ,
1153
+ @" https://someapp.app.google?somekey=somevalue" ,
1154
+ @" https://someapp.app.google/?somekey=somevalue" ,
1155
+ @" https://someapp.app.google/somepath/somepath2" ,
1156
+ @" https://someapp.app.google/somepath/somepath2?somekey=somevalue" ,
1157
+ @" https://someapp.app.google/somepath/somepath2?link=https://somedomain" ,
1139
1158
@" https://someapp.page.link" ,
1140
1159
@" https://someapp.page.link/" ,
1141
1160
@" https://someapp.page.link?" ,
@@ -1376,9 +1395,11 @@ - (void)testHandleUniversalLinkCompletionReturnsYesForValidDDL {
1376
1395
NSArray <NSString *> *urlStrings = @[
1377
1396
@" https://some.page.link/test" , @" https://some.page.link/test-test" ,
1378
1397
@" https://some.page.link/test_test" , @" https://some.page.link/test_test-test" ,
1379
- @" https://some.app.goo.gl/test_test-test" ,
1398
+ @" https://some.app.goo.gl/test_test-test" , @" https://some.app.google/test_test-test " ,
1380
1399
@" https://n8r9f.app.goo.gl/?ibi=com%2E google%2E GCMTestApp%2E dev&amv=0&imv=1%2E 0&link=https%3A%2F%2F www%2E google%2E com" ,
1381
- @" https://n8r9f.app.goo.gl/?link=https%3A%2F%2F www%2E google%2E com&ibi=com%2E google%2E GCMTestApp%2E dev&amv=0&imv=1%2E 0"
1400
+ @" https://n8r9f.app.goo.gl/?link=https%3A%2F%2F www%2E google%2E com&ibi=com%2E google%2E GCMTestApp%2E dev&amv=0&imv=1%2E 0" ,
1401
+ @" https://n8r9f.app.google/?ibi=com%2E google%2E GCMTestApp%2E dev&amv=0&imv=1%2E 0&link=https%3A%2F%2F www%2E google%2E com" ,
1402
+ @" https://n8r9f.app.google/?link=https%3A%2F%2F www%2E google%2E com&ibi=com%2E google%2E GCMTestApp%2E dev&amv=0&imv=1%2E 0"
1382
1403
];
1383
1404
1384
1405
for (NSString *urlString in urlStrings) {
0 commit comments